Function at 0x10042ff0
Capabilities:
Enumerate pe sections
Parse pe header
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push str.gta_sa.exe
mov dword [ebp - 4], edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x10043037
push str.Failed_to_open_file
push str.Error_logging_jumps.__s._n
call fcn.10015060
add esp, 8
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push 0
push 0
push 0
push 2
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov esi, eax
mov dword [ebp - 0xc], esi
test esi, esi
jne 0x10043073
push str.Failed_to_create_file_mapping
push str.Error_logging_jumps.__s._n
call fcn.10015060
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push 0
push 0
push 0
push 4
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
jne 0x100430b0
push str.Failed_to_map_view_of_file
push str.Error_logging_jumps.__s._n
call fcn.10015060
add esp, 8
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push ebx
call esi
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x5a4d
cmp word [edi], ax
je 0x100430e8
push str.Invalid_DOS_signature
push str.Error_logging_jumps.__s._n
call fcn.10015060
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push ebx
call esi
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0x3c]
add edx, edi
cmp dword [edx], 0x4550
je 0x10043123
push str.Invalid_NT_signature
push str.Error_logging_jumps.__s._n
call fcn.10015060
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push ebx
call esi
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
movzx esi, word [edx + 0x14]
xor eax, eax
add esi, 0x18
xor ecx, ecx
add esi, edx
movzx edx, word [edx + 6]
cmp ax, dx
jae 0x100431c1
nop dword [eax]
movzx eax, cx
cmp eax, dword [ebp - 4]
je 0x10043153
inc ecx
add esi, 0x28
cmp cx, dx
jb 0x10043140
jmp 0x100431c1
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 0x10]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov dword [ebp - 8], edx
mov edx, ecx
sub edx, dword [eax]
mov dword [ebp - 4], ecx
mov ecx, dword [esi + 0x10]
cmp edx, ecx
jae 0x100431a9
mov eax, dword [eax + 8]
sub eax, dword [ebp - 8]
cmp ecx, eax
jbe 0x1004318a
push ecx
push ecx
mov ecx, dword [ebp + 8]
call fcn.10049130
jmp 0x100431a9
sub ecx, edx
push ecx
push 0
push dword [ebp - 4]
mov dword [ebp - 8], ecx
call fcn.100552a0
mov ecx, dword [ebp + 8]
add esp, 0xc
mov eax, dword [ebp - 8]
add eax, dword [ebp - 4]
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0xc]
push dword [eax]
mov eax, dword [esi + 0x14]
add eax, edi
push eax
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.10054d20
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push ebx
call esi
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret