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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [0x470008]
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.00430b10
push 0xf8
lea eax, [ebp - 0x13c]
push esi
push eax
call fcn.00430b10
add esp, 0x18
mov dword [ebp - 0x174], esi
xor eax, eax
mov dword [ebp - 0x178], 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 0x40b9f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40b9d7
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40b9de
mov esi, 0x80004005
push esi
push 0x3a
push str.c:_agent_work18_swix_src_burnengine_section.cpp
call fcn.00403953
push str.Failed_to_open_handle_to_engine_process_path.
push esi
jmp 0x40c0ae
mov eax, dword [ebp + 0x10]
cmp eax, 0xffffffff
jne 0x40ba00
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 0x40ba44
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40ba29
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40ba30
mov esi, 0x80004005
push esi
push 0x43
push str.c:_agent_work18_swix_src_burnengine_section.cpp
call fcn.00403953
push str.Failed_to_seek_to_start_of_file.
jmp 0x40b9f0
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 0x40ba93
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40ba75
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40ba7c
mov esi, 0x80004005
push esi
push 0x49
push str.c:_agent_work18_swix_src_burnengine_section.cpp
call fcn.00403953
push str.Failed_to_read_DOS_header.
jmp 0x40b9f0
cmp dword [ebp - 0x168], 0x40
jb 0x40c094
mov eax, 0x5a4d
cmp ax, word [ebp - 0x44]
jne 0x40c094
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 0x40baf8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40bada
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40bae1
mov esi, 0x80004005
push esi
push 0x59
push str.c:_agent_work18_swix_src_burnengine_section.cpp
call fcn.00403953
push str.Failed_to_seek_to_NT_header.
jmp 0x40b9f0
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 0x40bb4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40bb2c
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40bb33
mov esi, 0x80004005
push esi
push 0x5f
push str.c:_agent_work18_swix_src_burnengine_section.cpp
call fcn.00403953
push str.Failed_to_read_NT_header.
jmp 0x40b9f0
cmp dword [ebp - 0x168], 0x18
jb 0x40c079
cmp dword [ebp - 0x13c], 0x4550
jne 0x40c079
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 0x40bbc3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40bba5
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40bbac
mov esi, 0x80004005
push esi
push 0x6f
push str.c:_agent_work18_swix_src_burnengine_section.cpp
call fcn.00403953
push str.Failed_to_seek_to_section_info.
jmp 0x40b9f0
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 0x40bc15
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40bbf7
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40bbfe
mov esi, 0x80004005
push esi
push 0x74
push str.c:_agent_work18_swix_src_burnengine_section.cpp
call fcn.00403953
push str.Failed_to_read_signature_offset.
jmp 0x40b9f0
push esi
lea eax, [ebp - 0x168]
push eax
push 4
lea eax, [ebp - 0x178]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40bc67
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40bc49
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40bc50
mov esi, 0x80004005
push esi
push 0x79
push str.c:_agent_work18_swix_src_burnengine_section.cpp
call fcn.00403953
push str.Failed_to_read_signature_size.
jmp 0x40b9f0
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 0x40bcbe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40bc9d
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40bca4
mov esi, 0x80004005
push esi
push 0x84
push str.c:_agent_work18_swix_src_burnengine_section.cpp
call fcn.00403953
push str.Failed_to_seek_past_optional_headers.
jmp 0x40b9f0
push esi
lea eax, [ebp - 0x168]
mov edi, esi
push eax
push 0x28
lea eax, [ebp - 0x164]
mov dword [ebp - 0x170], edi
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40bd3f
xor esi, esi
inc esi
cmp dword [ebp - 0x168], 0x28
jb 0x40c051
lea eax, [ebp - 0x164]
cmp dword [eax], 0x7869772e
jne 0x40bd0a
cmp dword [eax + 4], 0x6e727562
je 0x40bd81
movzx eax, word [ebp - 0x136]
cmp esi, eax
jae 0x40c01b
push 0
lea eax, [ebp - 0x168]
inc edi
push eax
push 0x28
lea eax, [ebp - 0x164]
mov dword [ebp - 0x170], edi
push eax
push dword [ebx]
inc esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40bce6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40bd56
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40bd5d
mov esi, 0x80004005
push esi
push 0x8d
push str.c:_agent_work18_swix_src_burnengine_section.cpp
call fcn.00403953
push edi
push str.Failed_to_read_image_section_header__index:__u
push esi
call fcn.0044466b
add esp, 0xc
jmp 0x40c0b5
cmp dword [ebp - 0x154], 0x34
jae 0x40bdb1
mov edi, 0x8007000d
push edi
push 0xac
push str.c:_agent_work18_swix_src_burnengine_section.cpp
mov esi, edi
call fcn.00403953
push dword [ebp - 0x154]
push str.Failed_to_read_section_info__data_to_short:__u
jmp 0x40c073
push 1
push dword [ebp - 0x154]
call fcn.00403a78
mov edi, eax
mov dword [ebp - 0x16c], edi
test edi, edi
jne 0x40bdec
mov ebx, 0x8007000e
push ebx
push 0xb1
push str.c:_agent_work18_swix_src_burnengine_section.cpp
mov esi, ebx
call fcn.00403953
push str.Failed_to_allocate_buffer_for_section_info.
push ebx
jmp 0x40c0ae
xor esi, esi
push esi
push esi
push esi
push dword [ebp - 0x150]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40be41
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40be1a
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40be21
mov esi, 0x80004005
push esi
push 0xb7
push str.c:_agent_work18_swix_src_burnengine_section.cpp
call fcn.00403953
push str.Failed_to_seek_to_section_info.
push esi
call fcn.0044466b
jmp 0x40c043
mov eax, dword [ebp - 0x150]
add eax, 0x1c
push esi
mov dword [ebp - 0x170], 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 0x40bea0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40be82
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x40be89
mov esi, 0x80004005
push esi
push 0xc0
push str.c:_agent_work18_swix_src_burnengine_section.cpp
call fcn.00403953
push str.Failed_to_read_section_info.
jmp 0x40be36
mov eax, dword [ebp - 0x154]
cmp eax, dword [ebp - 0x168]
jbe 0x40becf
mov edi, 0x8007000d
push edi
push 0xc5
push str.c:_agent_work18_swix_src_burnengine_section.cpp
mov esi, edi
call fcn.00403953
push str.Failed_to_read_complete_section_info.
jmp 0x40c037
cmp dword [edi + 4], 2
je 0x40bf0e
mov edi, 0x8007000d
push edi
push 0xcc
push str.c:_agent_work18_swix_src_burnengine_section.cpp
mov esi, edi
call fcn.00403953
mov eax, dword [ebp - 0x16c]
push dword [eax + 4]
push str.Failed_to_read_section_info__unsupported_version:__08x
push edi
call fcn.0044466b
mov edi, dword [ebp - 0x16c]
add esp, 0xc
jmp 0x40c045
lea eax, [ebp - 0x180]
push eax
push dword [ebx + 4]
call fcn.00449804
mov esi, eax
test esi, esi
jns 0x40bf2d
push str.Failed_to_get_total_size_of_bundle.
jmp 0x40be36
mov edx, dword [edi + 0x18]
mov dword [ebx + 8], edx
cmp dword [edi + 0x20], 0
je 0x40bf41
mov eax, dword [edi + 0x24]
add eax, dword [edi + 0x20]
jmp 0x40bf5a
mov ecx, dword [ebp - 0x174]
test ecx, ecx
je 0x40bf55
mov eax, dword [ebp - 0x178]
add eax, ecx
jmp 0x40bf5a
mov eax, dword [edi + 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 eax, dword [ebp - 0x170]
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.00403a78
mov ecx, eax
mov dword [ebx + 0x38], ecx
test ecx, ecx
jne 0x40bfde
mov ebx, 0x8007000e
push ebx
push 0xef
push str.c:_agent_work18_swix_src_burnengine_section.cpp
mov esi, ebx
call fcn.00403953
push str.Failed_to_allocate_memory_for_container_sizes.
push ebx
jmp 0x40be37
mov eax, dword [ebx + 0x34]
shl eax, 2
push eax
lea eax, [edi + 0x30]
push eax
push ecx
call fcn.00430010
add esp, 0xc
lea eax, [edi + 8]
push eax
call fcn.0040b6c5
mov esi, eax
test esi, esi
jns 0x40c045
push esi
push 0xf5
push str.c:_agent_work18_swix_src_burnengine_section.cpp
call fcn.00403953
push str.PE_Header_from_file_didnt_match_PE_Header_in_memory.
jmp 0x40be36
mov edi, 0x8007000d
push edi
push 0xa0
push str.c:_agent_work18_swix_src_burnengine_section.cpp
mov esi, edi
call fcn.00403953
push str.Failed_to_find_Burn_section.
push edi
call fcn.0044466b
mov edi, dword [ebp - 0x16c]
pop ecx
pop ecx
test edi, edi
je 0x40c0b5
push edi
call fcn.00403b3d
jmp 0x40c0b5
mov edi, 0x8007000d
push edi
push 0x92
push str.c:_agent_work18_swix_src_burnengine_section.cpp
mov esi, edi
call fcn.00403953
push dword [ebp - 0x170]
push str.Failed_to_read_complete_image_section_header__index:__u
push edi
jmp 0x40bd74
mov edi, 0x8007000d
push edi
push 0x64
push str.c:_agent_work18_swix_src_burnengine_section.cpp
mov esi, edi
call fcn.00403953
push str.Failed_to_find_valid_NT_image_header_in_buffer.
jmp 0x40c0ad
mov edi, 0x8007000d
push edi
push 0x4e
push str.c:_agent_work18_swix_src_burnengine_section.cpp
mov esi, edi
call fcn.00403953
push str.Failed_to_find_valid_DOS_image_header_in_buffer.
push edi
call fcn.0044466b
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042f1b3
leave
ret 0xc