Function at 0x47c3e0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 0x2c
push ebx
push esi
push edi
test eax, eax
je 0x47c60f
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x47c60f
mov ebx, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
shl eax, 3
push eax
push dword [ebp + 0x14]
call ebx
test eax, eax
jne 0x47c60f
mov ecx, dword [ebp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_IsBadWritePtr]
test ecx, ecx
je 0x47c435
mov eax, dword [ebp + 0x10]
shl eax, 2
push eax
push ecx
call esi
test eax, eax
jne 0x47c60f
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x47c449
push 4
push eax
call esi
test eax, eax
jne 0x47c60f
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x47c462
mov eax, dword [ebp + 0x10]
shl eax, 2
push eax
push 0
push ecx
call fcn.00489e90
add esp, 0xc
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x47c46f
mov dword [eax], 0
mov esi, dword [ebp + 8]
test esi, esi
je 0x47c60f
push 0x40
push esi
call ebx
test eax, eax
jne 0x47c60f
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x47c60f
mov esi, dword [esi + 0x3c]
add esi, dword [ebp + 8]
push 0xf8
push esi
call ebx
test eax, eax
jne 0x47c60f
cmp dword [esi], 0x4550
jne 0x47c60f
mov eax, dword [esi + 0x80]
test eax, eax
je 0x47c619
mov edx, dword [ebp + 8]
lea esi, [eax + edx]
mov eax, dword [esi + 0xc]
test eax, eax
je 0x47c4f2
add eax, edx
push edi
push eax
call fcn.004af066
add esp, 8
test eax, eax
je 0x47c4ef
mov eax, dword [esi + 0x20]
add esi, 0x14
mov edx, dword [ebp + 8]
test eax, eax
jne 0x47c4d2
mov edx, dword [ebp + 8]
cmp dword [esi + 0xc], 0
je 0x47c619
mov eax, dword [esi]
mov ebx, 1
mov ecx, dword [esi + 0x10]
add eax, edx
mov dword [ebp - 0xc], eax
add ecx, edx
mov dword [ebp - 4], ecx
mov eax, dword [eax]
test eax, eax
je 0x47c5e4
js 0x47c5c5
lea edi, [edx + 2]
add edi, eax
cmp byte [edi], 0
je 0x47c5d9
mov ebx, dword [ebp + 0x10]
xor eax, eax
xor esi, esi
mov dword [ebp - 8], eax
test ebx, ebx
je 0x47c56d
nop dword [eax]
mov eax, dword [ebp + 0x14]
mov edx, dword [eax + esi*8]
movzx eax, byte [edi]
movsx ecx, byte [edx]
cmp ecx, eax
jne 0x47c562
push edi
push edx
call fcn.004af066
add esp, 8
test eax, eax
je 0x47c5f5
inc esi
cmp esi, ebx
jb 0x47c540
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp + 0x14]
test eax, eax
je 0x47c5c5
push 0x1c
lea eax, [ebp - 0x2c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 0x18]
push eax
push 4
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
call edi
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp - 4]
test edx, edx
je 0x47c5a4
mov eax, dword [ecx]
mov dword [edx + esi*4], eax
mov eax, dword [ebx + esi*8 + 4]
mov dword [ecx], eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
call edi
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp - 4]
test eax, eax
je 0x47c5c5
inc dword [eax]
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
add eax, 4
add ecx, 4
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], ecx
mov eax, dword [eax]
test eax, eax
jne 0x47c51a
lea ebx, [eax + 1]
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x14]
mov ecx, 1
mov eax, dword [ebp - 8]
cmp dword [ebx + esi*8 + 4], eax
cmovne eax, ecx
mov ecx, dword [ebp - 4]
jmp 0x47c570
push 1
push 0x57
call dword [sym.imp.USER32.dll_SetLastErrorEx]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret