Function at 0x476d10
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov dword [ebp - 8], ecx
cmp dword [ebp + 8], 0
jne 0x476d26
xor al, al
jmp 0x476fc4
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0
mov byte [ebp - 1], 0
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x476d6a
cmp dword [ebp - 0x10], 0
jne 0x476d83
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error:_Cannot_open_the_file._Error_code:__u__n
call fcn.0046dd80
add esp, 8
jmp 0x476f43
push 0
push 0
push 0
push 2
push 0
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x476db9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error:_Cannot_open_the_file_mapping_object._Error_code:__u__n
call fcn.0046dd80
add esp, 8
jmp 0x476f43
push 0
push 0
push 0
push 4
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x476ded
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error:_Cannot_map_the_file._Error_code:__u__n
call fcn.0046dd80
add esp, 8
jmp 0x476f43
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
push ecx
mov ecx, dword [ebp - 8]
call fcn.004750e0
movzx edx, al
test edx, edx
jne 0x476e18
push str.Error:_File_is_not_a_PE_executable1._n
call fcn.0046dd80
add esp, 4
jmp 0x476f43
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
push edx
mov ecx, dword [ebp - 8]
call fcn.00475120
movzx eax, al
test eax, eax
jne 0x476e49
push str.Error:_File_is_not_a_PE_executable2._n
call fcn.0046dd80
add esp, 4
jmp 0x476f43
mov ecx, dword [ebp - 0x18]
push ecx
mov ecx, dword [ebp - 8]
call fcn.004751c0
movzx edx, al
test edx, edx
jne 0x476e6e
push str.Error:_File_is_not_a_PE_executable3._n
call fcn.0046dd80
add esp, 4
jmp 0x476f43
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x18]
add edx, 0x18
push edx
mov ecx, dword [ebp - 8]
call fcn.00476160
movzx eax, al
test eax, eax
jne 0x476eac
push str.Error:_File_is_not_a_PE_executable._n
call fcn.0046dd80
add esp, 4
jmp 0x476f43
cmp dword [ebp - 0x24], 0
je 0x476eb8
cmp dword [ebp - 0x1c], 0
jne 0x476ec7
push str.Debug_directory_not_found._n
call fcn.0046dd80
add esp, 4
jmp 0x476f43
mov dword [ebp - 0x28], 0
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 8]
call fcn.00476b90
movzx ecx, al
test ecx, ecx
jne 0x476ef8
push str.Debug_directory_not_found._n
call fcn.0046dd80
add esp, 4
jmp 0x476f43
mov edx, dword [ebp - 0xc]
add edx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
mov ecx, dword [ebp - 8]
call fcn.004750a0
movzx edx, al
test edx, edx
jne 0x476f27
push str.Error:_Debug_directory_is_not_valid._n
call fcn.0046dd80
add esp, 4
jmp 0x476f43
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov ecx, dword [ebp - 8]
call fcn.00475420
xor eax, eax
jne 0x476d3f
cmp dword [ebp - 0xc], 0
je 0x476f6b
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x476f6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error:_Cannot_unmap_the_file._Error_code:__u__n
call fcn.0046dd80
add esp, 8
cmp dword [ebp - 0x14], 0
je 0x476f93
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x476f93
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error:_Cannot_close_the_file_mapping_object._Error_code:__u__n
call fcn.0046dd80
add esp, 8
cmp dword [ebp - 0x10], 0
je 0x476fc1
cmp dword [ebp - 0x10], 0xffffffff
je 0x476fc1
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x476fc1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error:_Cannot_close_the_file._Error_code:__u__n
call fcn.0046dd80
add esp, 8
mov al, byte [ebp - 1]
mov esp, ebp
pop ebp
ret 4