Function at 0x402850
Capabilities:
Get system information on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x710
push ebx
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x122]
mov word [esp + 0x120], bp
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x724]
push eax
push ebp
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, dword [esp + 0x728]
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
push esi
lea ecx, [esp + 0x324]
push 0x40b214
push ecx
mov dword [esp + 0x20], eax
call ebx
xor edx, edx
add esp, 0xc
mov dword [esp + 0x46], edx
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x9e]
mov dword [esp + 0x4a], edx
mov word [esp + 0x9c], bp
rep stosd dword es:[edi], eax
mov dword [esp + 0x4e], edx
push esi
push esi
lea eax, [esp + 0x528]
mov dword [esp + 0x5a], edx
push 0x40b178
push eax
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x20], ebp
mov word [esp + 0x54], bp
mov dword [esp + 0x66], edx
mov dword [esp + 0x38], ebp
call ebx
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x8c]
mov dword [esp + 0x88], ebp
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x24]
add esp, 0x10
xor esi, esi
xor ebx, ebx
cmp eax, ebp
mov dword [esp + 0x34], ebp
jne 0x402937
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x710
ret
lea ecx, [esp + 0x78]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edx, dword [esp + 0x80]
lea eax, [esp + 0x320]
push eax
mov dword [esp + 0x1c], edx
call fcn.004036c5
lea ecx, [esp + 0x524]
mov dword [esp + 0x24], eax
push ecx
lea edi, [eax + 0x40]
call fcn.004036c5
add esp, 8
add eax, edi
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x5c]
push 0x1c
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x6c]
cmp eax, 0x1000
jne 0x402bbe
cmp dword [esp + 0x70], 4
jne 0x402bbe
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x3c]
mov edi, eax
shr edi, 1
cmp edi, ecx
jle 0x4029e6
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x4029cd
push eax
call fcn.004033c5
add esp, 4
lea edx, [edi + edi + 2]
push edx
call fcn.004033d0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x6c]
add esp, 4
mov dword [esp + 0x3c], edi
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x34]
cmp edx, ecx
je 0x4029f6
xor esi, esi
xor ebx, ebx
lea edx, [eax + ecx]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x34], edx
lea edx, [esp + 0x2c]
push edx
push eax
mov eax, dword [esp + 0x18]
push eax
push ecx
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov ecx, dword [esp + 0x2c]
shr ecx, 1
cmp eax, ebp
je 0x402bba
cmp ecx, ebp
je 0x402bba
jle 0x402bbe
mov edx, dword [esp + 0x10]
mov dword [esp + 0x38], ecx
mov cx, word [esp + 0x320]
mov dword [esp + 0x24], edx
mov eax, dword [esp + 0x24]
mov ax, word [eax]
cmp ax, 0x20
jb 0x402b9a
cmp ax, 0x7f
ja 0x402b9a
cmp ebx, 3
ja case.default.0x402a6c
jmp dword [ebx*4 + 0x402c90]
cmp ax, word [esp + esi*2 + 0x320]
jne 0x402a94
mov eax, dword [esp + 0x20]
inc esi
cmp esi, eax
jl case.default.0x402a6c
mov ebx, 1
jmp case.default.0x402a6c
xor esi, esi
xor ebx, ebx
cmp ax, cx
jne case.default.0x402a6c
mov esi, 1
jmp case.default.0x402a6c
cmp ax, 0x30
jb 0x402ab7
cmp ax, 0x39
jbe 0x402ac3
cmp ax, 0x41
jb 0x402a94
cmp ax, 0x46
ja 0x402a94
mov edx, dword [esp + 0x20]
mov edi, esi
sub edi, edx
inc esi
mov word [esp + edi*2 + 0x9c], ax
lea eax, [edx + 0x40]
cmp esi, eax
jl case.default.0x402a6c
mov ebx, 2
jmp case.default.0x402a6c
mov edx, dword [esp + 0x20]
mov edi, esi
add edx, 0x40
sub edi, edx
cmp ax, word [esp + edi*2 + 0x520]
jne 0x402a94
mov eax, dword [esp + 0x30]
inc esi
cmp esi, eax
jl case.default.0x402a6c
mov ebx, 3
jmp case.default.0x402a6c
cmp ax, 0x30
jb 0x402a94
cmp ax, 0x39
ja 0x402a94
mov edx, dword [esp + 0x30]
mov edi, esi
sub edi, edx
inc esi
mov word [esp + edi*2 + 0x44], ax
lea eax, [edx + 0xa]
cmp esi, eax
jl case.default.0x402a6c
lea eax, [esp + 0x44]
push eax
call fcn.0040369c
mov ecx, dword [esp + 0x2c]
add esp, 4
cmp eax, ecx
jbe 0x402b81
lea ecx, [esp + 0x9c]
lea edx, [esp + 0x120]
push ecx
push edx
mov dword [esp + 0x30], eax
call fcn.00403677
add esp, 8
mov cx, word [esp + 0x320]
xor esi, esi
mov dword [esp + 0x1c], ebp
xor ebx, ebx
jmp case.default.0x402a6c
jne 0x402b6f
mov eax, dword [esp + 0x1c]
mov cx, word [esp + 0x320]
inc eax
xor esi, esi
mov dword [esp + 0x1c], eax
xor ebx, ebx
jmp case.default.0x402a6c
xor esi, esi
xor ebx, ebx
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x38]
add edx, 2
dec eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x38], eax
jne 0x402a48
jmp 0x402bbe
xor esi, esi
xor ebx, ebx
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x18]
add ecx, eax
mov eax, dword [esp + 0x40]
cmp eax, ebp
mov dword [esp + 0x18], ecx
jne 0x402977
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x402be9
push eax
call fcn.004033c5
add esp, 4
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x120]
push edx
call fcn.004036c5
add esp, 4
test eax, eax
je 0x402c3c
cmp dword [esp + 0x72c], ebp
je 0x402c3c
push ebp
call fcn.0040359b
mov edx, dword [esp + 0x2c]
add esp, 4
sub eax, edx
cmp eax, 0x1c20
jle 0x402c3c
lea eax, [esp + 0x120]
push 0x40dd38
push eax
call fcn.00403677
add esp, 8
mov edi, dword [esp + 0x730]
cmp edi, ebp
je 0x402c6c
mov esi, dword [esp + 0x734]
cmp esi, ebp
je 0x402c6c
lea ecx, [esi - 1]
lea edx, [esp + 0x120]
push ecx
push edx
push edi
call fcn.0040355e
add esp, 0xc
mov word [edi + esi*2 - 2], bp
lea eax, [esp + 0x120]
push eax
call fcn.004036c5
add esp, 4
xor ecx, ecx
cmp ecx, eax
pop edi
pop esi
sbb eax, eax
pop ebp
neg eax
pop ebx
add esp, 0x710
ret