Function at 0x40f28d
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [0x4b1040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x44]
push esi
push edi
xor esi, esi
push 0x40
push esi
push eax
mov dword [ebp - 0x168], esi
mov dword [ebp - 0x180], esi
mov dword [ebp - 0x17c], esi
call fcn.00452250
push 0xf8
lea eax, [ebp - 0x13c]
push esi
push eax
call fcn.00452250
add esp, 0x18
mov dword [ebp - 0x170], esi
xor eax, eax
mov dword [ebp - 0x174], esi
lea edi, [ebp - 0x164]
mov dword [ebp - 0x16c], esi
push 0xa
pop ecx
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebx], ecx
cmp ecx, 0xffffffff
jne 0x40f344
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40f31b
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40f322
mov esi, 0x80004005
push esi
push 0x33
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.0040129e
push str.Failed_to_open_handle_to_engine_process_path.
push esi
push 0x100
push 5
push 0x33
jmp 0x40fb16
mov eax, dword [ebp + 0x10]
cmp eax, 0xffffffff
jne 0x40f34e
mov eax, ecx
push esi
push esi
push esi
push esi
push ecx
mov dword [ebx + 4], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40f3a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40f377
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40f37e
mov esi, 0x80004005
push esi
push 0x3c
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.0040129e
push str.Failed_to_seek_to_start_of_file.
push esi
push 0x100
push 5
push 0x3c
jmp 0x40fb16
push esi
lea eax, [ebp - 0x168]
push eax
push 0x40
lea eax, [ebp - 0x44]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40f3fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40f3d1
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40f3d8
mov esi, 0x80004005
push esi
push 0x42
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.0040129e
push str.Failed_to_read_DOS_header.
push esi
push 0x100
push 5
push 0x42
jmp 0x40fb16
cmp dword [ebp - 0x168], 0x40
jb 0x40faf2
mov eax, 0x5a4d
cmp ax, word [ebp - 0x44]
jne 0x40faf2
mov eax, dword [ebp - 8]
push esi
push esi
cdq
push edx
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40f46a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40f441
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40f448
mov esi, 0x80004005
push esi
push 0x52
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.0040129e
push str.Failed_to_seek_to_NT_header.
push esi
push 0x100
push 5
push 0x52
jmp 0x40fb16
push esi
lea eax, [ebp - 0x168]
push eax
push 0x18
lea eax, [ebp - 0x13c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40f4c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40f49e
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40f4a5
mov esi, 0x80004005
push esi
push 0x58
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.0040129e
push str.Failed_to_read_NT_header.
push esi
push 0x100
push 5
push 0x58
jmp 0x40fb16
cmp dword [ebp - 0x168], 0x18
jb 0x40facc
cmp dword [ebp - 0x13c], 0x4550
jne 0x40facc
mov eax, dword [ebp - 8]
push esi
push esi
push esi
lea ecx, [eax + 0x58]
add eax, 0x98
push eax
push dword [ebx]
mov dword [ebp - 0x184], ecx
mov dword [ebp - 0x188], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40f54b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40f522
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40f529
mov esi, 0x80004005
push esi
push 0x68
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.0040129e
push str.Failed_to_seek_to_section_info.
push esi
push 0x100
push 5
push 0x68
jmp 0x40fb16
push esi
lea eax, [ebp - 0x168]
push eax
push 4
lea eax, [ebp - 0x170]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40f5a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40f57f
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40f586
mov esi, 0x80004005
push esi
push 0x6d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.0040129e
push str.Failed_to_read_signature_offset.
push esi
push 0x100
push 5
push 0x6d
jmp 0x40fb16
push esi
lea eax, [ebp - 0x168]
push eax
push 4
lea eax, [ebp - 0x174]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40f605
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40f5dc
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40f5e3
mov esi, 0x80004005
push esi
push 0x72
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.0040129e
push str.Failed_to_read_signature_size.
push esi
push 0x100
push 5
push 0x72
jmp 0x40fb16
movzx ecx, word [ebp - 0x128]
mov eax, dword [ebp - 8]
add ecx, 0x18
push esi
push esi
push esi
add eax, ecx
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40f664
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40f63b
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40f642
mov esi, 0x80004005
push esi
push 0x7d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.0040129e
push str.Failed_to_seek_past_optional_headers.
push esi
push 0x100
push 5
push 0x7d
jmp 0x40fb16
push 0
lea eax, [ebp - 0x168]
mov dword [ebp - 0x178], esi
push eax
push 0x28
lea eax, [ebp - 0x164]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f6e8
xor edi, edi
inc edi
cmp dword [ebp - 0x168], 0x28
jb 0x40fa96
lea eax, [ebp - 0x164]
cmp dword [eax], 0x7869772e
jne 0x40f6b3
cmp dword [eax + 4], 0x6e727562
je 0x40f73a
movzx eax, word [ebp - 0x136]
cmp edi, eax
jae 0x40fa4d
push 0
lea eax, [ebp - 0x168]
inc esi
push eax
push 0x28
lea eax, [ebp - 0x164]
mov dword [ebp - 0x178], esi
push eax
push dword [ebx]
inc edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40f68b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40f6ff
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40f706
mov esi, 0x80004005
push esi
mov ebx, 0x86
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push edi
call fcn.0040129e
push dword [ebp - 0x178]
push str.Failed_to_read_image_section_header__index:__u
push esi
push 0x100
push 5
push ebx
push edi
call fcn.004012a1
add esp, 0x1c
jmp 0x40fb1f
cmp dword [ebp - 0x154], 0x34
jae 0x40f773
mov ebx, 0x8007000d
mov esi, 0xa2
push ebx
push esi
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.0040129e
push dword [ebp - 0x154]
push str.Failed_to_read_section_info__data_too_short:__u
push ebx
push 0x100
push 5
push esi
jmp 0x40fabf
push 1
push dword [ebp - 0x154]
call fcn.004073cd
mov esi, eax
mov dword [ebp - 0x16c], esi
test esi, esi
jne 0x40f7bb
mov ebx, 0x8007000e
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0xa7
push edi
mov esi, ebx
call fcn.0040129e
push str.Failed_to_allocate_buffer_for_section_info.
push ebx
push 0x100
push 5
push 0xa7
jmp 0x40fb16
xor eax, eax
push eax
push eax
push eax
push dword [ebp - 0x150]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40f81b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40f7e9
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40f7f0
mov esi, 0x80004005
push esi
mov ebx, 0xad
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push edi
call fcn.0040129e
push str.Failed_to_seek_to_section_info.
push esi
push 0x100
push 5
push ebx
push edi
call fcn.004012a1
jmp 0x40fa7a
mov edi, dword [ebp - 0x150]
lea eax, [ebp - 0x168]
push 0
push eax
push dword [ebp - 0x154]
add edi, 0x1c
push esi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40f877
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40f857
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40f85e
mov esi, 0x80004005
push esi
mov ebx, 0xb6
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push edi
call fcn.0040129e
push str.Failed_to_read_section_info.
jmp 0x40f807
mov eax, dword [ebp - 0x154]
cmp eax, dword [ebp - 0x168]
jbe 0x40f8a6
mov ebx, 0x8007000d
mov esi, 0xba
push ebx
push esi
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.0040129e
push str.Failed_to_read_complete_section_info.
jmp 0x40fa69
cmp dword [esi + 4], 2
je 0x40f8e7
mov ebx, 0x8007000d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0xc0
push edi
call fcn.0040129e
push dword [esi + 4]
push str.Failed_to_read_section_info__unsupported_version:__08x
push ebx
push 0x100
push 5
push 0xc0
push edi
call fcn.004012a1
add esp, 0x1c
mov esi, ebx
jmp 0x40fa7d
add eax, 0xffffffd0
shr eax, 2
cmp eax, dword [esi + 0x2c]
jae 0x40f91f
mov ebx, 0x8007000d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0xc6
push edi
call fcn.0040129e
push dword [esi + 0x2c]
push str.Invalid_section_info__cContainers_too_large:__u
push ebx
push 0x100
push 5
push 0xc6
jmp 0x40f8d7
lea eax, [ebp - 0x180]
push eax
push dword [ebx + 4]
call fcn.00405811
mov esi, eax
test esi, esi
jns 0x40f950
push str.Failed_to_get_total_size_of_bundle.
push esi
push 0x100
push 5
push 0xca
push str.d:_awixwix_src_burnengine_section.cpp
jmp 0x40f811
mov esi, dword [ebp - 0x16c]
mov edx, dword [esi + 0x18]
mov dword [ebx + 8], edx
cmp dword [esi + 0x20], 0
je 0x40f96a
mov eax, dword [esi + 0x24]
add eax, dword [esi + 0x20]
jmp 0x40f983
mov ecx, dword [ebp - 0x170]
test ecx, ecx
je 0x40f97e
mov eax, dword [ebp - 0x174]
add eax, ecx
jmp 0x40f983
mov eax, dword [esi + 0x30]
add eax, edx
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x180]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 0x17c]
mov dword [ebx + 0x14], eax
mov eax, dword [ebp - 0x184]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 0x188]
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x20], edi
mov eax, dword [esi + 0x1c]
mov dword [ebx + 0x24], eax
mov eax, dword [esi + 0x20]
mov dword [ebx + 0x28], eax
mov eax, dword [esi + 0x24]
mov dword [ebx + 0x2c], eax
mov eax, dword [esi + 0x28]
mov dword [ebx + 0x30], eax
mov eax, dword [esi + 0x2c]
mov dword [ebx + 0x34], eax
push 1
shl eax, 2
push eax
call fcn.004073cd
mov ecx, eax
mov dword [ebx + 0x38], ecx
test ecx, ecx
jne 0x40fa0e
mov ebx, 0x8007000e
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0xe9
push edi
mov esi, ebx
call fcn.0040129e
push str.Failed_to_allocate_memory_for_container_sizes.
push ebx
push 0x100
push 5
push 0xe9
jmp 0x40f810
mov eax, dword [ebx + 0x34]
shl eax, 2
push eax
lea eax, [esi + 0x30]
push eax
push ecx
call fcn.004523b0
add esp, 0xc
lea eax, [esi + 8]
push eax
call fcn.0040ef76
mov esi, eax
test esi, esi
jns 0x40fa7d
push esi
mov ebx, 0xef
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push edi
call fcn.0040129e
push str.PE_Header_from_file_didnt_match_PE_Header_in_memory.
jmp 0x40f807
mov ebx, 0x8007000d
mov esi, 0x97
push ebx
push esi
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.0040129e
push str.Failed_to_find_Burn_section.
push ebx
push 0x100
push 5
push esi
push edi
call fcn.004012a1
mov esi, ebx
add esp, 0x18
mov eax, dword [ebp - 0x16c]
test eax, eax
je 0x40fb1f
push eax
call fcn.0040758b
jmp 0x40fb1f
mov ebx, 0x8007000d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0x8a
push edi
call fcn.0040129e
push esi
push str.Failed_to_read_complete_image_section_header__index:__u
push ebx
push 0x100
push 5
push 0x8a
push edi
call fcn.004012a1
add esp, 0x1c
mov esi, ebx
jmp 0x40fb1f
mov ebx, 0x8007000d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0x5d
push edi
mov esi, ebx
call fcn.0040129e
push str.Failed_to_find_valid_NT_image_header_in_buffer.
push ebx
push 0x100
push 5
push 0x5d
jmp 0x40fb16
mov ebx, 0x8007000d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0x47
push edi
mov esi, ebx
call fcn.0040129e
push str.Failed_to_find_valid_DOS_image_header_in_buffer.
push ebx
push 0x100
push 5
push 0x47
push edi
call fcn.004012a1
add esp, 0x18
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00451586
leave
ret 0xc