Function at 0x403d30
Capabilities:
Check os version
Get memory capacity
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x112c
call fcn.0040b8d0
fld qword [0x4196b0]
mov eax, dword [ebp + 8]
fstp qword [esp + 4]
push ebx
push esi
xor ebx, ebx
push edi
mov esi, 1
push eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0x30], 0x400
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x24], ebx
call fcn.0040bd16
fstp qword [esp + 0x3c]
fld qword [0x4196b0]
add esp, 4
fcomp qword [esp + 0x38]
fnstsw ax
test ah, 5
jp 0x403f62
xor eax, eax
mov ecx, 0x100
lea edi, [esp + 0x928]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
xor eax, eax
mov ecx, 0x100
lea edi, [esp + 0x520]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
push ecx
push esi
push ebx
push str.SYSTEMCurrentControlSetControlSession_ManagerMemory_Management
push 0x80000002
stosb byte es:[edi], al
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
cmp esi, ebx
jne 0x403dfd
lea edx, [esp + 0x2c]
push edx
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x92c]
push eax
lea ecx, [esp + 0x3c]
push ecx
push ebx
push str.PagingFiles
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, ebx
jne 0x403f67
mov ecx, dword [esp + 0x2c]
xor eax, eax
cmp ecx, ebx
jle 0x403e36
lea ebx, [ebx]
cmp byte [esp + eax + 0x928], bl
jne 0x403e31
mov byte [esp + eax + 0x928], 0x20
inc eax
cmp eax, ecx
jl 0x403e20
lea ecx, [esp + 0x928]
push 0x41950c
push ecx
call fcn.0040b9a6
mov edx, eax
add esp, 8
cmp edx, ebx
je 0x403ec9
cmp dword [esp + 0x30], ebx
jne 0x403e9e
xor eax, eax
mov ecx, 0x100
lea edi, [esp + 0xd30]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x2c]
push ecx
lea eax, [esp + 0xd38]
push eax
push str._s__d__d
push edx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
call fcn.0040bce2
add esp, 0x14
fild dword [esp + 0x24]
fadd qword [esp + 0x10]
fstp qword [esp + 0x10]
jmp 0x403ea2
mov dword [esp + 0x30], ebx
push 0x41950c
push ebx
call fcn.0040b9a6
mov edx, eax
add esp, 8
cmp edx, ebx
jne 0x403e51
fld qword [0x4196b0]
fld qword [esp + 0x10]
fucompp
fnstsw ax
test ah, 0x44
jp 0x403f3b
lea ecx, [esp + 0x80]
push ecx
mov dword [esp + 0x84], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x84], 6
jb 0x403f3b
lea edx, [esp + 0x40]
push edx
mov dword [esp + 0x44], 0x40
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x60]
shrd ecx, eax, 0x14
mov dword [esp + 0x10], ecx
shr eax, 0x14
mov ecx, eax
and eax, 0x7fffffff
mov dword [esp + 0x14], eax
and ecx, 0x80000000
fild qword [esp + 0x10]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebx
fild qword [esp + 0x10]
fchs
faddp st(1)
fstp qword [esp + 0x10]
fld qword [esp + 0x10]
fcomp qword [esp + 0x38]
fnstsw ax
test ah, 1
jne 0x403f53
mov dword [esp + 0x1c], ebx
jmp 0x4040c8
mov dword [esp + 0x1c], 1
mov esi, 0xffffec76
jmp 0x403f67
mov esi, 0xffffec77
xor eax, eax
cmp esi, 0xea
mov ecx, 0x100
lea edi, [esp + 0x520]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
je 0x40405c
cmp esi, 0xffffec76
je 0x403fff
cmp esi, 0xffffec77
je 0x403fc7
push str.S_FAILED_TO_OPEN_REGISTRY
call fcn.00401970
push eax
call fcn.004019b0
push str.S_FAILED_TO_OPEN_REGISTRY
call fcn.00401990
add esp, 0xc
lea edx, [esp + 0x520]
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
cmp cl, bl
jne 0x403fb8
jmp 0x40408a
push str.S_INVALID_SWAP_SPACE_REQ
call fcn.00401970
push eax
call fcn.004019b0
push str.S_INVALID_SWAP_SPACE_REQ
call fcn.00401990
add esp, 0xc
lea edx, [esp + 0x520]
jmp 0x403ff0
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
cmp cl, bl
jne 0x403ff0
jmp 0x40408a
fld qword [esp + 0x10]
call fcn.0040bd64
mov edi, dword [ebp + 8]
mov esi, eax
push edi
push esi
push str.S_FAIL_CHECKING_FOR_SWAP
call fcn.00401970
add esp, 4
push eax
lea edx, [esp + 0x52c]
push edx
call fcn.0040b90d
lea eax, [esp + 0x530]
push eax
call fcn.004019b0
add esp, 0x14
push edi
push esi
push str.S_FAIL_CHECKING_FOR_SWAP
call fcn.00401990
add esp, 4
push eax
lea ecx, [esp + 0x52c]
push ecx
call fcn.0040b90d
add esp, 0x10
jmp 0x40408a
push str.S_REGISTRY_KEY_TOO_LARGE
call fcn.00401970
push eax
call fcn.004019b0
push str.S_REGISTRY_KEY_TOO_LARGE
call fcn.00401990
add esp, 0xc
lea edx, [esp + 0x520]
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
cmp cl, bl
jne 0x404080
mov esi, dword [0x422914]
cmp esi, ebx
je 0x4040c8
lea eax, [esp + 0x520]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4040a0
sub eax, edx
push esi
push eax
lea edx, [esp + 0x528]
push 1
push edx
call fcn.0040bbdb
mov eax, dword [0x422914]
push eax
call fcn.0040b813
add esp, 0x14
mov esi, dword [esp + 0x1c]
xor eax, eax
cmp esi, ebx
mov ecx, 0x100
lea edi, [esp + 0x118]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
jne 0x404262
mov esi, dword [ebp + 8]
push esi
push str.S_CHECKING_FOR_SWAP
call fcn.00401970
add esp, 4
push eax
lea ecx, [esp + 0x120]
push ecx
call fcn.0040b90d
lea edx, [esp + 0x124]
push edx
call fcn.004019b0
add esp, 0x10
push esi
push str.S_CHECKING_FOR_SWAP
call fcn.00401990
add esp, 4
push eax
lea eax, [esp + 0x120]
push eax
call fcn.0040b90d
mov edx, dword [0x422914]
add esp, 0xc
cmp edx, ebx
je 0x404170
lea eax, [esp + 0x118]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x404147
push edx
sub eax, esi
push eax
lea ecx, [esp + 0x120]
push 1
push ecx
call fcn.0040bbdb
mov edx, dword [0x422914]
push edx
call fcn.0040b813
add esp, 0x14
fld qword [esp + 0x10]
call fcn.0040bd64
mov esi, eax
push esi
push str.S_ACTUAL_SWAP
call fcn.00401970
add esp, 4
push eax
lea eax, [esp + 0x120]
push eax
call fcn.0040b90d
lea ecx, [esp + 0x124]
push ecx
call fcn.004019b0
add esp, 0x10
push esi
push str.S_ACTUAL_SWAP
call fcn.00401990
add esp, 4
push eax
lea edx, [esp + 0x120]
push edx
call fcn.0040b90d
mov edx, dword [0x422914]
add esp, 0xc
cmp edx, ebx
je 0x404209
lea eax, [esp + 0x118]
lea esi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4041e0
push edx
sub eax, esi
push eax
lea eax, [esp + 0x120]
push 1
push eax
call fcn.0040bbdb
mov ecx, dword [0x422914]
push ecx
call fcn.0040b813
add esp, 0x14
push str.S_SPASSED
call fcn.00401970
push eax
call fcn.004019b0
push str.S_SPASSED
call fcn.00401990
mov edi, dword [0x422914]
add esp, 0xc
cmp edi, ebx
je 0x404257
mov ecx, eax
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
cmp dl, bl
jne 0x404235
push edi
sub ecx, esi
push ecx
push 1
push eax
call fcn.0040bbdb
mov edx, dword [0x422914]
push edx
call fcn.0040b813
add esp, 0x14
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.S_SFAILED
call fcn.00401970
push eax
call fcn.004019b0
push str.S_SFAILED
call fcn.00401990
mov edi, dword [0x422914]
add esp, 0xc
cmp edi, ebx
je 0x4042bc
mov ecx, eax
lea esi, [ecx + 1]
mov edi, edi
mov dl, byte [ecx]
inc ecx
cmp dl, bl
jne 0x404290
push edi
sub ecx, esi
push ecx
push 1
push eax
call fcn.0040bbdb
mov eax, dword [0x422914]
push eax
call fcn.0040b813
mov eax, dword [esp + 0x30]
add esp, 0x14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret