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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x4241a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x34], eax
xor esi, esi
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x3c], eax
push edi
mov edi, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x40], ecx
cmp ebx, 0x40
jb 0x403b28
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x403f4f
mov edx, dword [ecx + 0x3c]
mov dword [ebp - 0x44], edx
lea eax, [edx + 0xf8]
cmp ebx, eax
jae 0x403b2f
push 0xd
jmp 0x403f54
cmp dword [edx + ecx], 0x4550
lea ebx, [edx + ecx]
jne 0x403f4f
mov eax, 0x14c
cmp word [ebx + 4], ax
jne 0x403f4f
mov ecx, dword [ebx + 0x38]
test cl, 1
jne 0x403f4f
movzx edx, word [ebx + 0x14]
movzx eax, word [ebx + 6]
add edx, 0x24
test eax, eax
je 0x403b90
movzx edi, word [ebx + 6]
add edx, ebx
nop
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 0x403b70
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebx + 0x50]
dec eax
add eax, ecx
lea edx, [ecx - 1]
not edx
and eax, edx
mov dword [ebp - 0x30], eax
lea eax, [ecx - 1]
add eax, esi
mov esi, dword [ebp - 0x30]
and eax, edx
cmp esi, eax
jne 0x403f4f
push dword [ebp - 0x3c]
push 4
push 0x3000
push esi
push dword [ebx + 0x34]
call dword [ebp - 0x34]
add esp, 0x14
mov dword [ebp - 0x30], eax
test eax, eax
jne 0x403bfc
push dword [ebp - 0x3c]
push 4
push 0x3000
push esi
mov esi, dword [ebp - 0x34]
push eax
call esi
add esp, 0x14
mov dword [ebp - 0x30], eax
test eax, eax
jne 0x403bff
push 0xe
jmp 0x403f54
mov esi, dword [ebp - 0x34]
push 0x40
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x30]
mov dword [edi], eax
test eax, eax
jne 0x403c32
push dword [ebp - 0x3c]
push 0x8000
push eax
push ecx
mov ecx, dword [ebp - 0x38]
call ecx
add esp, 0x10
push 0xe
jmp 0x403f54
mov dword [eax + 4], ecx
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 ecx, dword [ebp - 0x38]
mov dword [eax + 0x1c], esi
mov eax, dword [edi]
mov esi, dword [ebp - 0x3c]
mov dword [eax + 0x20], ecx
mov ecx, dword [edi]
mov eax, dword [ebp + 0x18]
mov dword [ecx + 0x24], eax
mov ecx, dword [edi]
mov eax, dword [ebp + 0x1c]
mov dword [ecx + 0x28], eax
mov ecx, dword [edi]
mov eax, dword [ebp + 0x20]
mov dword [ecx + 0x2c], eax
mov eax, dword [edi]
mov dword [eax + 0x34], esi
mov ecx, dword [edi]
mov eax, dword [ebp - 0x24]
mov dword [ecx + 0x3c], eax
mov ecx, edi
push dword [ebx + 0x54]
push dword [ebp + 0xc]
call fcn.00403650
test eax, eax
je 0x403ddd
push esi
push 4
push 0x1000
push dword [ebx + 0x54]
push dword [ebp - 0x30]
call dword [ebp - 0x34]
push dword [ebx + 0x54]
mov ebx, dword [ebp - 0x40]
mov esi, eax
push ebx
push esi
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebx + 0x3c]
add esp, 0x20
mov eax, dword [edi]
add ecx, esi
xor esi, esi
mov dword [ebp - 0x38], 0
mov dword [eax], ecx
mov eax, dword [edi]
mov ecx, dword [ebp - 0x30]
mov eax, dword [eax]
mov dword [eax + 0x34], ecx
mov ecx, dword [edi]
mov eax, dword [ecx]
mov ebx, dword [ecx + 4]
movzx edx, word [eax + 0x14]
add edx, eax
cmp si, word [eax + 6]
jae 0x403da4
mov eax, ecx
lea edi, [edx + 0x24]
mov dword [ebp - 0x34], eax
nop dword [eax]
mov edx, dword [edi + 4]
test edx, edx
jne 0x403d3a
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x44]
mov esi, dword [edx + ecx + 0x38]
test esi, esi
jle 0x403d7e
push dword [eax + 0x34]
mov eax, dword [edi]
push 4
push 0x1000
add eax, ebx
push esi
push eax
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x1c]
call eax
add esp, 0x14
test eax, eax
je 0x403dda
mov eax, dword [edi]
push esi
add eax, ebx
push 0
push eax
mov dword [edi - 4], eax
call sub.VCRUNTIME140.dll_memset
jmp 0x403d7b
mov eax, dword [edi + 8]
add eax, edx
cmp dword [ebp + 0xc], eax
jb 0x403dd2
push dword [ecx + 0x34]
mov eax, dword [edi]
push 4
push 0x1000
add eax, ebx
push edx
push eax
mov eax, dword [ecx + 0x1c]
call eax
add esp, 0x14
test eax, eax
je 0x403dda
push dword [edi + 4]
mov eax, dword [edi + 8]
mov esi, dword [edi]
add eax, dword [ebp - 0x40]
add esi, ebx
push eax
push esi
call sub.VCRUNTIME140.dll_memcpy
mov dword [edi - 4], esi
add esp, 0xc
mov eax, dword [ebp - 0x2c]
add edi, 0x28
mov esi, dword [ebp - 0x38]
inc esi
mov dword [ebp - 0x38], esi
mov ecx, dword [eax]
mov dword [ebp - 0x34], ecx
mov eax, dword [ecx]
movzx eax, word [eax + 6]
cmp esi, eax
jge 0x403da1
mov eax, ecx
jmp 0x403cf0
mov edi, dword [ebp - 0x2c]
mov edx, dword [ecx]
mov ebx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x40]
mov eax, dword [edx + 0x34]
sub eax, dword [ebx + esi + 0x34]
mov dword [ebp - 0x44], eax
je 0x403e60
cmp dword [edx + 0xa4], 0
jne 0x403de9
mov edi, dword [ebp - 0x2c]
xor eax, eax
mov dword [ecx + 0x18], eax
jmp 0x403e67
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [ebp - 0x2c]
mov ecx, edi
call fcn.004038b0
jmp 0x403f5a
mov ebx, dword [ecx + 4]
mov edi, dword [edx + 0xa0]
add edi, ebx
mov dword [ebp - 0x38], ebx
mov eax, dword [edi]
test eax, eax
je 0x403e53
nop dword [eax]
mov ecx, dword [edi + 4]
lea edx, [edi + 8]
add ebx, eax
xor esi, esi
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x403e42
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x403e32
mov ecx, dword [ebp - 0x44]
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 0x403e14
mov eax, dword [edi + ecx]
add edi, ecx
mov ebx, dword [ebp - 0x38]
test eax, eax
jne 0x403e00
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
mov edi, dword [ebp - 0x2c]
mov eax, 1
mov dword [ecx + 0x18], eax
jmp 0x403e67
mov dword [ecx + 0x18], 1
mov ecx, edi
call fcn.004034c0
test eax, eax
je 0x403ddd
mov ecx, edi
call fcn.00403750
test eax, eax
je 0x403ddd
mov edx, dword [edi]
mov ecx, edx
mov eax, dword [edx]
mov esi, dword [eax + 0xc0]
test esi, esi
je 0x403ec1
mov edi, dword [edx + 4]
mov esi, dword [esi + edi + 0xc]
test esi, esi
je 0x403ebe
mov eax, dword [esi]
test eax, eax
je 0x403ebe
push 0
push 1
push edi
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x403ea6
mov edi, dword [ebp - 0x2c]
mov ecx, dword [edi]
jmp 0x403ec1
mov edi, dword [ebp - 0x2c]
mov eax, dword [ecx]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x403f30
mov edx, dword [ebp - 0x30]
add eax, edx
cmp dword [ecx + 0x14], 0
je 0x403f15
push 0
push 1
push edx
call eax
test eax, eax
jne 0x403ef4
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, edi
call fcn.004038b0
jmp 0x403f5a
mov eax, dword [edi]
pop edi
pop esi
pop ebx
mov dword [eax + 0x10], 1
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fd3f
mov esp, ebp
pop ebp
ret 0x20
pop edi
pop esi
mov dword [ecx + 0x38], eax
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fd3f
mov esp, ebp
pop ebp
ret 0x20
pop edi
pop esi
mov dword [ecx + 0x38], 0
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040fd3f
mov esp, ebp
pop ebp
ret 0x20
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040fd3f
mov esp, ebp
pop ebp
ret 0x20