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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [0x49c00c]
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.00447480
push 0xf8
lea eax, [ebp - 0x13c]
push esi
push eax
call fcn.00447480
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 0x40dc18
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40dbef
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40dbf6
mov esi, 0x80004005
push esi
push 0x33
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.00401225
push str.Failed_to_open_handle_to_engine_process_path.
push esi
push 0x100
push 5
push 0x33
jmp 0x40e3ea
mov eax, dword [ebp + 0x10]
cmp eax, 0xffffffff
jne 0x40dc22
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 0x40dc74
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40dc4b
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40dc52
mov esi, 0x80004005
push esi
push 0x3c
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.00401225
push str.Failed_to_seek_to_start_of_file.
push esi
push 0x100
push 5
push 0x3c
jmp 0x40e3ea
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 0x40dcce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40dca5
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40dcac
mov esi, 0x80004005
push esi
push 0x42
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.00401225
push str.Failed_to_read_DOS_header.
push esi
push 0x100
push 5
push 0x42
jmp 0x40e3ea
cmp dword [ebp - 0x168], 0x40
jb 0x40e3c6
mov eax, 0x5a4d
cmp ax, word [ebp - 0x44]
jne 0x40e3c6
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 0x40dd3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40dd15
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40dd1c
mov esi, 0x80004005
push esi
push 0x52
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.00401225
push str.Failed_to_seek_to_NT_header.
push esi
push 0x100
push 5
push 0x52
jmp 0x40e3ea
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 0x40dd9b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40dd72
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40dd79
mov esi, 0x80004005
push esi
push 0x58
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.00401225
push str.Failed_to_read_NT_header.
push esi
push 0x100
push 5
push 0x58
jmp 0x40e3ea
cmp dword [ebp - 0x168], 0x18
jb 0x40e3a0
cmp dword [ebp - 0x13c], 0x4550
jne 0x40e3a0
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 0x40de1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40ddf6
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40ddfd
mov esi, 0x80004005
push esi
push 0x68
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.00401225
push str.Failed_to_seek_to_section_info.
push esi
push 0x100
push 5
push 0x68
jmp 0x40e3ea
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 0x40de7c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40de53
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40de5a
mov esi, 0x80004005
push esi
push 0x6d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.00401225
push str.Failed_to_read_signature_offset.
push esi
push 0x100
push 5
push 0x6d
jmp 0x40e3ea
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 0x40ded9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40deb0
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40deb7
mov esi, 0x80004005
push esi
push 0x72
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.00401225
push str.Failed_to_read_signature_size.
push esi
push 0x100
push 5
push 0x72
jmp 0x40e3ea
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 0x40df38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40df0f
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40df16
mov esi, 0x80004005
push esi
push 0x7d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.00401225
push str.Failed_to_seek_past_optional_headers.
push esi
push 0x100
push 5
push 0x7d
jmp 0x40e3ea
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 0x40dfbc
xor edi, edi
inc edi
cmp dword [ebp - 0x168], 0x28
jb 0x40e36a
lea eax, [ebp - 0x164]
cmp dword [eax], 0x7869772e
jne 0x40df87
cmp dword [eax + 4], 0x6e727562
je 0x40e00e
movzx eax, word [ebp - 0x136]
cmp edi, eax
jae 0x40e321
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 0x40df5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40dfd3
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40dfda
mov esi, 0x80004005
push esi
mov ebx, 0x86
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push edi
call fcn.00401225
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.00401228
add esp, 0x1c
jmp 0x40e3f3
cmp dword [ebp - 0x154], 0x34
jae 0x40e047
mov ebx, 0x8007000d
mov esi, 0xa2
push ebx
push esi
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.00401225
push dword [ebp - 0x154]
push str.Failed_to_read_section_info__data_too_short:__u
push ebx
push 0x100
push 5
push esi
jmp 0x40e393
push 1
push dword [ebp - 0x154]
call fcn.0040540b
mov esi, eax
mov dword [ebp - 0x16c], esi
test esi, esi
jne 0x40e08f
mov ebx, 0x8007000e
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0xa7
push edi
mov esi, ebx
call fcn.00401225
push str.Failed_to_allocate_buffer_for_section_info.
push ebx
push 0x100
push 5
push 0xa7
jmp 0x40e3ea
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 0x40e0ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40e0bd
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40e0c4
mov esi, 0x80004005
push esi
mov ebx, 0xad
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push edi
call fcn.00401225
push str.Failed_to_seek_to_section_info.
push esi
push 0x100
push 5
push ebx
push edi
call fcn.00401228
jmp 0x40e34e
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 0x40e14b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40e12b
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40e132
mov esi, 0x80004005
push esi
mov ebx, 0xb6
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push edi
call fcn.00401225
push str.Failed_to_read_section_info.
jmp 0x40e0db
mov eax, dword [ebp - 0x154]
cmp eax, dword [ebp - 0x168]
jbe 0x40e17a
mov ebx, 0x8007000d
mov esi, 0xba
push ebx
push esi
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.00401225
push str.Failed_to_read_complete_section_info.
jmp 0x40e33d
cmp dword [esi + 4], 2
je 0x40e1bb
mov ebx, 0x8007000d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0xc0
push edi
call fcn.00401225
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.00401228
add esp, 0x1c
mov esi, ebx
jmp 0x40e351
add eax, 0xffffffd0
shr eax, 2
cmp eax, dword [esi + 0x2c]
jae 0x40e1f3
mov ebx, 0x8007000d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0xc6
push edi
call fcn.00401225
push dword [esi + 0x2c]
push str.Invalid_section_info__cContainers_too_large:__u
push ebx
push 0x100
push 5
push 0xc6
jmp 0x40e1ab
lea eax, [ebp - 0x180]
push eax
push dword [ebx + 4]
call fcn.00463b82
mov esi, eax
test esi, esi
jns 0x40e224
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 0x40e0e5
mov esi, dword [ebp - 0x16c]
mov edx, dword [esi + 0x18]
mov dword [ebx + 8], edx
cmp dword [esi + 0x20], 0
je 0x40e23e
mov eax, dword [esi + 0x24]
add eax, dword [esi + 0x20]
jmp 0x40e257
mov ecx, dword [ebp - 0x170]
test ecx, ecx
je 0x40e252
mov eax, dword [ebp - 0x174]
add eax, ecx
jmp 0x40e257
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.0040540b
mov ecx, eax
mov dword [ebx + 0x38], ecx
test ecx, ecx
jne 0x40e2e2
mov ebx, 0x8007000e
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0xe9
push edi
mov esi, ebx
call fcn.00401225
push str.Failed_to_allocate_memory_for_container_sizes.
push ebx
push 0x100
push 5
push 0xe9
jmp 0x40e0e4
mov eax, dword [ebx + 0x34]
shl eax, 2
push eax
lea eax, [esi + 0x30]
push eax
push ecx
call fcn.004475e0
add esp, 0xc
lea eax, [esi + 8]
push eax
call fcn.0040d84a
mov esi, eax
test esi, esi
jns 0x40e351
push esi
mov ebx, 0xef
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push edi
call fcn.00401225
push str.PE_Header_from_file_didnt_match_PE_Header_in_memory.
jmp 0x40e0db
mov ebx, 0x8007000d
mov esi, 0x97
push ebx
push esi
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push edi
call fcn.00401225
push str.Failed_to_find_Burn_section.
push ebx
push 0x100
push 5
push esi
push edi
call fcn.00401228
mov esi, ebx
add esp, 0x18
mov eax, dword [ebp - 0x16c]
test eax, eax
je 0x40e3f3
push eax
call fcn.004055c9
jmp 0x40e3f3
mov ebx, 0x8007000d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0x8a
push edi
call fcn.00401225
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.00401228
add esp, 0x1c
mov esi, ebx
jmp 0x40e3f3
mov ebx, 0x8007000d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0x5d
push edi
mov esi, ebx
call fcn.00401225
push str.Failed_to_find_valid_NT_image_header_in_buffer.
push ebx
push 0x100
push 5
push 0x5d
jmp 0x40e3ea
mov ebx, 0x8007000d
mov edi, str.d:_awixwix_src_burnengine_section.cpp
push ebx
push 0x47
push edi
mov esi, ebx
call fcn.00401225
push str.Failed_to_find_valid_DOS_image_header_in_buffer.
push ebx
push 0x100
push 5
push 0x47
push edi
call fcn.00401228
add esp, 0x18
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00446806
leave
ret 0xc