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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x4530d0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x18c]
stosd dword es:[edi], eax
xor esi, esi
push 0x40
stosd dword es:[edi], eax
lea eax, [ebp - 0x44]
push esi
push eax
mov dword [ebp - 0x170], esi
mov dword [ebp - 0x168], esi
mov dword [ebp - 0x184], esi
mov dword [ebp - 0x180], esi
call fcn.004272a0
push 0xf8
lea eax, [ebp - 0x13c]
push esi
push eax
call fcn.004272a0
or dword [ebx], 0xffffffff
xor eax, eax
add esp, 0x18
lea edi, [ebp - 0x164]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x15c]
rep stosd dword es:[edi], eax
push esi
lea eax, [ebp - 0x170]
push eax
mov dword [ebp - 0x17c], esi
mov dword [ebp - 0x178], esi
mov dword [ebp - 0x194], esi
call fcn.00430da7
mov esi, eax
test esi, esi
jns 0x4021ca
push str.Failed_to_get_path_to_engine_process.
push esi
call fcn.0042eef6
pop ecx
pop ecx
jmp 0x402652
push 0
push 0x80
push 3
push 0
push 5
push SysReAllocString
push dword [ebp - 0x170]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebx], eax
cmp eax, 0xffffffff
jne 0x402234
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x402203
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x40220e
mov esi, 0x80004005
push esi
push 0x45
push str.section.cpp
call fcn.0043166e
push dword [ebp - 0x170]
push str.Failed_to_open_handle_to_engine_process_path:__ls
push esi
call fcn.0042eef6
add esp, 0xc
jmp 0x402652
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
push 0
push dword [ebp - 0x188]
push dword [ebp - 0x18c]
push eax
call edi
test eax, eax
jne 0x402287
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x402265
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x402270
mov esi, 0x80004005
push esi
push 0x4c
push str.section.cpp
call fcn.0043166e
push str.Failed_to_seek_to_start_of_file.
jmp 0x4021bd
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 0x168]
push eax
push 0x40
lea eax, [ebp - 0x44]
push eax
push dword [ebx]
call esi
test eax, eax
jne 0x4022da
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4022b8
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x4022c3
mov esi, 0x80004005
push esi
push 0x52
push str.section.cpp
call fcn.0043166e
push str.Failed_to_read_DOS_header.
jmp 0x4021bd
cmp dword [ebp - 0x168], 0x40
jb 0x4022ee
mov eax, 0x5a4d
cmp ax, word [ebp - 0x44]
je 0x40230a
mov esi, 0x8007000d
push esi
push 0x57
push str.section.cpp
call fcn.0043166e
push str.Failed_to_find_valid_DOS_image_header_in_buffer.
jmp 0x4021bd
mov eax, dword [ebp - 8]
push 0
cdq
push 0
push edx
push eax
push dword [ebx]
call edi
test eax, eax
jne 0x402352
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x402330
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x40233b
mov esi, 0x80004005
push esi
push 0x62
push str.section.cpp
call fcn.0043166e
push str.Failed_to_seek_to_NT_header.
jmp 0x4021bd
push 0
lea eax, [ebp - 0x168]
push eax
push 0x18
lea eax, [ebp - 0x13c]
push eax
push dword [ebx]
call esi
test eax, eax
jne 0x4023a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x402380
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x40238b
mov esi, 0x80004005
push esi
push 0x68
push str.section.cpp
call fcn.0043166e
push str.Failed_to_read_NT_header.
jmp 0x4021bd
cmp dword [ebp - 0x168], 0x18
jb 0x4023b7
cmp dword [ebp - 0x13c], 0x4550
je 0x4023d3
mov esi, 0x8007000d
push esi
push 0x6d
push str.section.cpp
call fcn.0043166e
push str.Failed_to_find_valid_NT_image_header_in_buffer.
jmp 0x4021bd
mov eax, dword [ebp - 8]
lea ecx, [eax + 0x58]
mov dword [ebp - 0x190], ecx
xor ecx, ecx
push ecx
push ecx
add eax, 0x98
push ecx
push eax
push dword [ebx]
mov dword [ebp - 0x188], eax
call edi
test eax, eax
jne 0x40242e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40240c
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x402417
mov esi, 0x80004005
push esi
push 0x78
push str.section.cpp
call fcn.0043166e
push str.Failed_to_seek_to_section_info.
jmp 0x4021bd
push 0
lea eax, [ebp - 0x168]
push eax
push 4
lea eax, [ebp - 0x17c]
push eax
push dword [ebx]
call esi
test eax, eax
jne 0x40247e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40245c
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x402467
mov esi, 0x80004005
push esi
push 0x7d
push str.section.cpp
call fcn.0043166e
push str.Failed_to_read_signature_offset.
jmp 0x4021bd
push 0
lea eax, [ebp - 0x168]
push eax
push 4
lea eax, [ebp - 0x178]
push eax
push dword [ebx]
call esi
test eax, eax
jne 0x4024d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4024ac
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x4024b7
mov esi, 0x80004005
push esi
push 0x82
push str.section.cpp
call fcn.0043166e
push str.Failed_to_read_signature_size.
jmp 0x4021bd
movzx eax, word [ebp - 0x128]
mov ecx, dword [ebp - 8]
lea eax, [eax + ecx + 0x18]
xor ecx, ecx
push ecx
push ecx
push ecx
push eax
push dword [ebx]
call edi
test eax, eax
jne 0x402526
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x402501
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x40250c
mov esi, 0x80004005
push esi
push 0x8d
push str.section.cpp
call fcn.0043166e
push str.Failed_to_seek_past_optional_headers.
jmp 0x4021bd
and dword [ebp - 0x174], 0
push 0
lea eax, [ebp - 0x168]
push eax
push 0x28
lea eax, [ebp - 0x164]
push eax
push dword [ebx]
call esi
test eax, eax
je 0x4025bc
mov dword [ebp - 0x16c], 1
cmp dword [ebp - 0x168], 0x28
jb 0x4025fb
push 8
pop ecx
mov edi, str..wixburn
lea esi, [ebp - 0x164]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x402577
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402679
movzx eax, word [ebp - 0x136]
cmp dword [ebp - 0x16c], eax
jae 0x402620
inc dword [ebp - 0x174]
inc dword [ebp - 0x16c]
push 0
lea eax, [ebp - 0x168]
push eax
push 0x28
lea eax, [ebp - 0x164]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402551
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4025d0
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x4025db
mov esi, 0x80004005
push esi
push 0x96
push str.section.cpp
call fcn.0043166e
push dword [ebp - 0x174]
push str.Failed_to_read_image_section_header__index:__u
jmp 0x402226
mov esi, 0x8007000d
push esi
push 0x9b
push str.section.cpp
call fcn.0043166e
push dword [ebp - 0x174]
push str.Failed_to_read_complete_image_section_header__index:__u
jmp 0x402226
mov esi, 0x8007000d
push esi
push 0xa9
push str.section.cpp
call fcn.0043166e
push str.Failed_to_find_Burn_section.
push esi
call fcn.0042eef6
mov edi, dword [ebp - 0x194]
pop ecx
pop ecx
test edi, edi
je 0x402652
push edi
call fcn.00431a27
cmp dword [ebp - 0x170], 0
je 0x402666
push dword [ebp - 0x170]
call fcn.0042f657
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042731a
leave
ret 4
cmp dword [ebp - 0x154], 0x34
jae 0x4026a7
mov esi, 0x8007000d
push esi
push 0xb5
push str.section.cpp
call fcn.0043166e
push dword [ebp - 0x154]
push str.Failed_to_read_section_info__data_to_short:__u
jmp 0x402226
push 1
push dword [ebp - 0x154]
call fcn.0043186c
mov edi, eax
xor esi, esi
cmp edi, esi
jne 0x4026db
mov esi, 0x8007000e
push esi
push 0xba
push str.section.cpp
call fcn.0043166e
push str.Failed_to_allocate_buffer_for_section_info.
jmp 0x4021bd
mov eax, dword [ebp - 0x150]
push esi
push esi
xor ecx, ecx
push ecx
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x402732
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x402707
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x402712
mov esi, 0x80004005
push esi
push 0xc0
push str.section.cpp
call fcn.0043166e
push str.Failed_to_seek_to_section_info.
push esi
call fcn.0042eef6
jmp 0x402646
mov eax, dword [ebp - 0x150]
add eax, 0x1c
push esi
mov dword [ebp - 0x16c], eax
lea eax, [ebp - 0x168]
push eax
push dword [ebp - 0x154]
push edi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402792
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x402770
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x40277b
mov esi, 0x80004005
push esi
push 0xc9
push str.section.cpp
call fcn.0043166e
push str.Failed_to_read_section_info.
jmp 0x402727
mov eax, dword [ebp - 0x154]
cmp eax, dword [ebp - 0x168]
jbe 0x4027bf
mov esi, 0x8007000d
push esi
push 0xce
push str.section.cpp
call fcn.0043166e
push str.Failed_to_read_complete_section_info.
jmp 0x402727
cmp dword [edi + 4], 2
je 0x4027ed
mov esi, 0x8007000d
push esi
push 0xd5
push str.section.cpp
call fcn.0043166e
push dword [edi + 4]
push str.Failed_to_read_section_info__unsupported_version:__08x
push esi
call fcn.0042eef6
jmp 0x4028c9
lea eax, [ebp - 0x184]
push eax
push dword [ebx]
call fcn.00434996
mov esi, eax
test esi, esi
jns 0x40280b
push str.Failed_to_get_total_size_of_bundle.
jmp 0x402727
mov eax, dword [edi + 0x18]
mov dword [ebx + 4], eax
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x40281d
mov eax, dword [edi + 0x24]
jmp 0x40282d
mov ecx, dword [ebp - 0x17c]
test ecx, ecx
je 0x402834
mov eax, dword [ebp - 0x178]
add eax, ecx
mov dword [ebx + 8], eax
jmp 0x40283c
mov ecx, dword [edi + 0x30]
add ecx, eax
mov dword [ebx + 8], ecx
mov eax, dword [ebp - 0x184]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 0x180]
mov dword [ebx + 0x14], eax
mov eax, dword [ebp - 0x190]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 0x188]
mov dword [ebx + 0x1c], eax
mov eax, dword [ebp - 0x16c]
mov dword [ebx + 0x20], eax
mov eax, dword [edi + 0x1c]
mov dword [ebx + 0x24], eax
mov eax, dword [edi + 0x20]
mov dword [ebx + 0x28], eax
mov eax, dword [edi + 0x24]
mov dword [ebx + 0x2c], eax
mov eax, dword [edi + 0x28]
mov dword [ebx + 0x30], eax
mov eax, dword [edi + 0x2c]
mov dword [ebx + 0x34], eax
push 1
shl eax, 2
push eax
call fcn.0043186c
mov dword [ebx + 0x38], eax
test eax, eax
jne 0x4028b8
mov esi, 0x8007000e
push esi
push 0xf8
push str.section.cpp
call fcn.0043166e
push str.Failed_to_allocate_memory_for_container_sizes.
jmp 0x402727
mov ecx, dword [ebx + 0x34]
shl ecx, 2
push ecx
lea ecx, [edi + 0x30]
push ecx
push eax
call fcn.00427330
add esp, 0xc
jmp 0x402648