Function at 0x47b8e0
Capabilities:
Get system information on windows
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
xor esi, esi
mov dword [ebp - 4], edi
cmp ebx, 0x40
jb 0x47b916
mov edx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [edx], ax
jne 0x47bd3e
mov ecx, dword [edx + 0x3c]
lea eax, [ecx + 0xf8]
cmp ebx, eax
jae 0x47b929
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x20
cmp dword [ecx + edx], 0x4550
lea ebx, [ecx + edx]
jne 0x47bd3e
mov eax, 0x14c
cmp word [ebx + 4], ax
jne 0x47bd3e
mov ecx, dword [ebx + 0x38]
test cl, 1
jne 0x47bd3e
movzx edx, word [ebx + 0x14]
movzx eax, word [ebx + 6]
add edx, 0x24
test eax, eax
je 0x47b990
movzx edi, word [ebx + 6]
add edx, ebx
nop dword [eax]
mov eax, dword [edx + 4]
lea edx, [edx + 0x28]
test eax, eax
cmovne ecx, eax
add ecx, dword [edx - 0x28]
cmp ecx, esi
cmovbe ecx, esi
mov esi, ecx
mov ecx, dword [ebx + 0x38]
sub edi, 1
jne 0x47b970
mov edi, dword [ebp - 4]
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebx + 0x50]
dec eax
add eax, ecx
lea edx, [ecx - 1]
not edx
and eax, edx
mov dword [ebp - 0x10], eax
lea eax, [ecx - 1]
add eax, esi
mov esi, dword [ebp - 0x10]
and eax, edx
cmp esi, eax
jne 0x47bd3e
push 0
push 4
push 0x3000
push esi
push dword [ebx + 0x34]
call fcn.0047b860
add esp, 0x14
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x47ba09
push eax
push 4
push 0x3000
push esi
push eax
call fcn.0047b860
mov esi, eax
add esp, 0x14
mov dword [ebp - 0xc], esi
test esi, esi
jne 0x47ba0b
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x20
mov esi, eax
push 0x40
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [edi], eax
test eax, eax
jne 0x47ba45
push eax
push 0x8000
push eax
push esi
call fcn.0047b880
add esp, 0x10
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x20
mov dword [eax + 4], esi
movzx ecx, word [ebx + 0x16]
mov eax, dword [edi]
shr ecx, 0xd
and ecx, 1
mov dword [eax + 0x14], ecx
mov eax, dword [edi]
mov dword [eax + 0x1c], fcn.0047b860
mov eax, dword [edi]
mov dword [eax + 0x20], fcn.0047b880
mov eax, dword [edi]
mov dword [eax + 0x24], 0x47b8a0
mov eax, dword [edi]
mov dword [eax + 0x28], 0x47b8b0
mov eax, dword [edi]
mov dword [eax + 0x2c], 0x47b8d0
mov eax, dword [edi]
mov dword [eax + 0x34], 0
mov ecx, dword [edi]
mov eax, dword [ebp - 0x34]
mov dword [ecx + 0x3c], eax
push dword [ebx + 0x54]
push dword [ebp + 0xc]
call fcn.0047b4a0
test eax, eax
je 0x47bbdf
push 0
push 4
push 0x1000
push dword [ebx + 0x54]
push esi
call fcn.0047b860
push dword [ebx + 0x54]
mov esi, eax
push dword [ebp + 8]
push esi
call fcn.006cdf50
mov eax, dword [ebp + 8]
add esp, 0x20
mov dword [ebp - 0x10], 0
mov ecx, dword [eax + 0x3c]
mov eax, dword [edi]
add ecx, esi
xor esi, esi
mov dword [eax], ecx
mov eax, dword [edi]
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax + 0x34], ecx
mov edx, dword [edi]
mov eax, dword [edx + 4]
mov dword [ebp - 8], eax
mov eax, dword [edx]
movzx ecx, word [eax + 0x14]
add ecx, eax
cmp si, word [eax + 6]
jae 0x47bbad
lea edi, [ecx + 0x24]
mov esi, dword [edi + 4]
mov eax, edx
test esi, esi
jne 0x47bb4b
mov esi, dword [ebx + 0x38]
test esi, esi
jle 0x47bb8d
push dword [eax + 0x34]
mov ecx, dword [eax + 0x1c]
mov eax, dword [edi]
add eax, dword [ebp - 8]
push 4
push 0x1000
push esi
push eax
call ecx
add esp, 0x14
test eax, eax
je 0x47bbdc
mov eax, dword [edi]
add eax, dword [ebp - 8]
push esi
push 0
push eax
mov dword [edi - 4], eax
call fcn.006ce4d0
jmp 0x47bb8a
mov eax, dword [edi + 8]
add eax, esi
cmp dword [ebp + 0xc], eax
jb 0x47bbd4
push dword [edx + 0x34]
mov eax, dword [edi]
add eax, dword [ebp - 8]
mov ecx, dword [edx + 0x1c]
push 4
push 0x1000
push esi
push eax
call ecx
add esp, 0x14
test eax, eax
je 0x47bbdc
push dword [edi + 4]
mov eax, dword [edi + 8]
mov esi, dword [edi]
add eax, dword [ebp + 8]
add esi, dword [ebp - 8]
push eax
push esi
call fcn.006cdf50
mov dword [edi - 4], esi
add esp, 0xc
mov eax, dword [ebp - 4]
add edi, 0x28
mov esi, dword [ebp - 0x10]
inc esi
mov dword [ebp - 0x10], esi
mov edx, dword [eax]
mov eax, dword [edx]
movzx eax, word [eax + 6]
cmp esi, eax
jl 0x47bb07
mov edi, dword [ebp - 4]
mov ecx, dword [edx]
mov eax, dword [ecx + 0x34]
sub eax, dword [ebx + 0x34]
mov dword [ebp + 8], eax
je 0x47bc6c
cmp dword [ecx + 0xa4], 0
jne 0x47bbf1
mov edi, dword [ebp - 4]
xor eax, eax
mov dword [edx + 0x18], eax
jmp 0x47bc73
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [ebp - 4]
mov ecx, edi
call fcn.0047bec0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x20
mov ebx, dword [edx + 4]
mov edi, dword [ecx + 0xa0]
add edi, ebx
mov dword [ebp + 0xc], ebx
mov eax, dword [edi]
test eax, eax
je 0x47bc5f
mov ecx, dword [edi + 4]
lea edx, [edi + 8]
add ebx, eax
xor esi, esi
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x47bc4e
nop dword [eax]
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x47bc3e
mov ecx, dword [ebp + 8]
and eax, 0xfff
add dword [eax + ebx], ecx
mov ecx, dword [edi + 4]
inc esi
add edx, 2
lea eax, [ecx - 8]
shr eax, 1
cmp esi, eax
jb 0x47bc20
mov eax, dword [edi + ecx]
add edi, ecx
mov ebx, dword [ebp + 0xc]
test eax, eax
jne 0x47bc05
mov eax, dword [ebp - 4]
mov edx, dword [eax]
mov edi, dword [ebp - 4]
mov eax, 1
mov dword [edx + 0x18], eax
jmp 0x47bc73
mov dword [edx + 0x18], 1
mov ecx, edi
call fcn.0047b6e0
test eax, eax
je 0x47bbdf
mov ecx, edi
call fcn.0047b580
test eax, eax
je 0x47bbdf
mov edx, dword [edi]
mov ecx, edx
mov eax, dword [edx]
mov esi, dword [eax + 0xc0]
test esi, esi
je 0x47bcc5
mov ebx, dword [edx + 4]
mov esi, dword [esi + ebx + 0xc]
test esi, esi
je 0x47bcc5
mov eax, dword [esi]
test eax, eax
je 0x47bcc5
push 0
push 1
push ebx
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x47bcb2
mov ecx, dword [edi]
mov eax, dword [ecx]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x47bd29
mov edx, dword [ebp - 0xc]
add eax, edx
cmp dword [ecx + 0x14], 0
je 0x47bd18
push 0
push 1
push edx
call eax
test eax, eax
jne 0x47bd01
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, edi
call fcn.0047bec0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x20
mov eax, dword [edi]
pop edi
pop esi
pop ebx
mov dword [eax + 0x10], 1
mov eax, 1
mov esp, ebp
pop ebp
ret 0x20
pop edi
pop esi
mov dword [ecx + 0x38], eax
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x20
pop edi
pop esi
mov dword [ecx + 0x38], 0
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x20
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x20