Function at 0x570207cc
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x18], eax
mov edi, dword [ebp + 0xc]
xor eax, eax
push ebp
push 0x570209ed
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 4], eax
mov eax, 0x20
call sub.rtl120.bpl__System__GetMem_qqri
mov esi, eax
mov edx, 0x20
mov eax, esi
call fcn.5700189c
mov ebx, esi
mov eax, dword [ebp + 8]
mov dword [ebx], eax
test edi, edi
setne al
mov byte [ebx + 0xc], al
test al, al
je 0x57020826
mov eax, dword [edi]
mov dword [ebx + 4], eax
mov eax, dword [edi + 4]
mov dword [ebx + 8], eax
mov edi, dword [ebx]
test edi, edi
je 0x570209bc
cmp edi, 0xffffffff
je 0x570209bc
push 0
push 0
push 0
push 4
push 0
push edi
call sub.kernel32.dll_CreateFileMappingW
mov dword [ebx + 0x10], eax
cmp dword [ebx + 0x10], 0
je 0x570209bc
push 0
push 0
push 0
push 0xf001f
mov eax, dword [ebx + 0x10]
push eax
call sub.kernel32.dll_MapViewOfFile
mov edi, eax
mov dword [ebx + 0x14], edi
test edi, edi
je 0x570209bc
cmp word [edi], 0x5a4d
jne 0x570209bc
mov edx, dword [ebx + 0x14]
mov eax, edx
add eax, 0x3c
mov eax, dword [eax]
add eax, edx
mov dword [ebx + 0x18], eax
cmp dword [eax], 0x4550
jne 0x570209bc
cmp word [eax + 0x18], 0x20b
jne 0x570208be
lea edx, [eax + 0x18]
mov edx, dword [edx + 0x80]
mov dword [ebp - 0x14], edx
add eax, 0x18
add eax, 0xf0
mov dword [ebp - 8], eax
jmp 0x570208d2
mov edx, dword [eax + 0x88]
mov dword [ebp - 0x14], edx
add eax, 0x18
add eax, 0xe0
mov dword [ebp - 8], eax
push 2
call sub.kernel32.dll_SetLastError
mov byte [ebp - 0xd], 0
mov eax, dword [ebx + 0x18]
movzx edi, word [eax + 6]
dec edi
test edi, edi
jl 0x5702092c
inc edi
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0xc]
lea edx, [edx + edx*4]
mov ecx, dword [ebp - 8]
lea edx, [ecx + edx*8]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromPChar_qqrr27System__AnsiStringT_us_i0__pcus
mov edx, dword [ebp - 0x18]
mov ecx, dword [sym.madBasic_.bpl__Madstrings_PosTextIs1A]
mov ecx, dword [ecx]
mov eax, 0x57020a0c
call ecx
test al, al
je 0x57020926
mov byte [ebp - 0xd], 1
jmp 0x5702092c
inc dword [ebp - 0xc]
dec edi
jne 0x570208f1
cmp byte [ebp - 0xd], 0
jne 0x570209bc
mov eax, dword [ebx + 0x18]
movzx edi, word [eax + 6]
dec edi
test edi, edi
jl 0x570209bc
inc edi
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax*8 + 0xc]
cmp eax, dword [ebp - 0x14]
jne 0x570209b6
cmp dword [ebp + 0x10], 0
je 0x5702098c
mov edx, dword [0x5701fadc]
mov eax, 0x2c
call sub.rtl120.bpl__System__New_qqripv
mov edi, eax
mov dword [ebx + 0x1c], edi
mov edx, 0x2c
mov eax, edi
call fcn.5700189c
mov eax, dword [ebx + 0x1c]
mov byte [eax + 0x14], 1
jmp 0x570209b1
mov eax, dword [ebp - 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 8]
mov ecx, dword [edx + eax*8 + 0xc]
mov eax, dword [ebp - 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 8]
mov edx, dword [edx + eax*8 + 0x14]
mov eax, dword [ebx + 0x14]
call fcn.5701fec4
mov dword [ebx + 0x1c], eax
mov dword [ebp - 4], esi
jmp 0x570209bc
inc dword [ebp - 0xc]
dec edi
jne 0x5702094a
cmp dword [ebp - 4], 0
jne 0x570209d7
call sub.kernel32.dll_GetLastError
mov ebx, eax
push 0xffffffffffffffff
push esi
call sym.madBasic_.bpl__Madres_EndUpdateResourceW_qqsuii
push ebx
call sub.kernel32.dll_SetLastError
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x570209f4
lea eax, [ebp - 0x18]
call sub.rtl120.bpl__System__LStrClr_qqrpv
ret