Function at 0x5359d0
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x38
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80000000
mov dword [esp], str.test_.exe
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov edi, eax
mov dword [ebp - 0x1c], eax
call fcn.0057d110
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x195
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], str.failed_to_create_file___ld__n
mov dword [esp + 8], eax
xor eax, eax
cmp edi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.00533410
mov dword [esp], edi
mov dword [esp + 4], 0
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x198
xor eax, eax
mov dword [esp + 4], str.file_size_wrong_n
cmp ebx, dword [esi + 0xc]
setae al
mov dword [ebp - 0x14], esi
mov dword [esp], eax
call fcn.00533410
mov dword [esp], edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 2
mov dword [esp + 4], 0
call dword [sym.imp.kernel32.dll_CreateFileMappingA]
sub esp, 0x18
mov edi, eax
mov dword [ebp - 0x20], eax
call fcn.0057d110
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x19b
xor eax, eax
test edi, edi
setne al
mov dword [esp + 4], str.failed_to_create_file_n
mov dword [esp], eax
call fcn.00533410
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 4
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_MapViewOfFile]
sub esp, 0x14
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x19e
xor eax, eax
test esi, esi
setne al
mov dword [esp + 4], str.failed_to_map_file_n
mov dword [esp], eax
call fcn.00533410
test esi, esi
je 0x535cf8
mov edx, dword [esi + 0x3c]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x28], esi
xor ebx, ebx
add edx, esi
mov edi, eax
add eax, 0xc
lea ecx, [edx + 0xf8]
mov dword [ebp - 0x24], edx
mov esi, edi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], eax
mov ecx, dword [esi]
test ecx, ecx
je 0x535ca4
call fcn.0057d110
mov ecx, dword [ebp - 0x18]
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x1aa
lea eax, [ebx + ebx*4]
lea edi, [ecx + eax*8]
mov eax, dword [esi]
mov ecx, dword [edi]
cmp dword [eax], ecx
je 0x535d30
mov eax, 1
xor eax, 1
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.section__ld_name_wrong_n
call fcn.00533410
call fcn.0057d110
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x1ab
mov dword [esp + 8], ebx
mov dword [esp + 4], str.section__ld_vaddr_wrong_n
mov eax, dword [esi]
mov edx, dword [edi + 0xc]
cmp dword [eax + 0xc], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00533410
call fcn.0057d110
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x1ac
mov eax, dword [esi]
mov ecx, dword [edi + 0x10]
mov eax, dword [eax + 0x10]
mov dword [esp + 8], ebx
mov dword [esp + 0x10], ecx
cmp ecx, eax
mov dword [esp + 0xc], eax
setae al
mov dword [esp + 4], str.section__ld_SizeOfRawData_wrong___ld_vs__ld__n
movzx eax, al
mov dword [esp], eax
call fcn.00533410
call fcn.0057d110
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x1ad
mov dword [esp + 8], ebx
mov dword [esp + 4], str.section__ld_PointerToRawData_wrong_n
mov eax, dword [esi]
mov ecx, dword [edi + 0x14]
cmp dword [eax + 0x14], ecx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00533410
call fcn.0057d110
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x1ae
mov dword [esp + 8], ebx
mov dword [esp + 4], str.section__ld_characteristics_wrong_n
mov eax, dword [esi]
mov edx, dword [edi + 0x24]
cmp dword [eax + 0x24], edx
sete al
add ebx, 1
movzx eax, al
mov dword [esp], eax
call fcn.00533410
mov eax, dword [ebp - 0x10]
add esi, 4
cmp esi, eax
jne 0x535b7a
mov esi, dword [ebp - 0x28]
call fcn.0057d110
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x1b2
mov dword [esp + 4], str.number_of_sections_wrong_n
mov edi, dword [ebp - 0x24]
movzx eax, word [edi + 6]
cmp eax, ebx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00533410
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x10]
test eax, eax
js 0x535cf8
movzx edx, word [edi + 6]
cmp eax, edx
jl 0x535d48
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x20]
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x1c]
sub esp, 4
mov dword [esp], eax
call ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [edi + 4]
cmp dword [eax + 4], ecx
jne 0x535bab
xor eax, eax
jmp 0x535bb0
mov edx, dword [ebp - 0x18]
lea eax, [eax + eax*4]
mov ebx, dword [edx + eax*8 + 0xc]
call fcn.0057d110
add ebx, esi
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x1b8
xor eax, eax
mov dword [esp + 4], str.Characteristics_wrong_n
mov edx, dword [ebx]
test edx, edx
sete al
mov dword [esp], eax
call fcn.00533410
call fcn.0057d110
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x1b9
mov eax, dword [ebx + 4]
mov dword [esp + 4], str.TimeDateStamp_wrong__lu_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00533410
call fcn.0057d110
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x1ba
xor eax, eax
mov dword [esp + 4], str.MajorVersion_wrong_n
cmp word [ebx + 8], 4
sete al
mov dword [esp], eax
call fcn.00533410
call fcn.0057d110
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x1bb
xor eax, eax
mov dword [esp + 4], str.MinorVersion_wrong_n
cmp word [ebx + 0xa], 0
sete al
mov dword [esp], eax
call fcn.00533410
call fcn.0057d110
mov edi, dword [ebp - 0x14]
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x1bd
movzx edx, word [ebx + 0xc]
mov eax, dword [edi + 0x14]
mov dword [esp + 4], str.NumberOfNamedEntries_should_be__ld_instead_of__d_n
mov dword [esp + 0xc], edx
cmp edx, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00533410
call fcn.0057d110
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x1bf
movzx edx, word [ebx + 0xe]
mov eax, dword [edi + 0x18]
mov dword [esp + 4], str.NumberOfIdEntries_should_be__ld_instead_of__d_n
mov dword [esp + 0xc], edx
cmp edx, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00533410
call fcn.0057d110
mov ecx, dword [ebp - 0x18]
mov dword [eax], 0x5f4f57
mov dword [eax + 4], 0x1c2
mov eax, dword [ebp - 0x24]
mov edx, dword [eax + 0x88]
mov eax, dword [edi + 0x10]
lea eax, [eax + eax*4]
mov eax, dword [ecx + eax*8 + 0xc]
mov dword [esp + 0xc], edx
mov dword [esp + 4], str.VirtualAddress_in_optional_header_should_be__ld_instead_of__ld_n
cmp edx, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00533410
jmp 0x535cf8