Function at 0x407210
Capabilities:
Get common file path
Get memory capacity
Set registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe60
mov eax, 0x5105ec
push ebx
push esi
push edi
lea edi, [ebp - 0x1a0]
mov esi, dword [ebp + 0x10]
call fcn.004e1410
xor edx, edx
cmp byte [0x521ae8], 0
mov dword [ebp - 0x2c], edx
je 0x407251
mov eax, 3
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x407811
push 0x2db5e
mov ecx, dword [ebp + 8]
push ecx
push 0x521ae8
call fcn.004e0b90
add esp, 0xc
mov dword [ebp - 0x9c], 0x40
lea eax, [ebp - 0x9c]
push eax
call sub.KERNEL32.DLL_GlobalMemoryStatusEx
push 0
push 0x400
push 0
push 0x400
mov eax, dword [ebp - 0x8c]
mov edx, dword [ebp - 0x88]
call fcn.004e79a7
call fcn.004e79a7
mov dword [ebp - 0x30], eax
lea edx, [ebp - 0x34]
push edx
push 0x5103bc
push reloc.WS2_32.DLL_bind
call sub.ADVAPI32.DLL_RegCreateKeyA
test eax, eax
jne 0x4072dc
push 4
lea ecx, [ebp - 0x30]
push ecx
push 4
push 0
push str.CurrentFreeMemSizeMB
mov eax, dword [ebp - 0x34]
push eax
call sub.ADVAPI32.DLL_RegSetValueExA
mov edx, dword [ebp - 0x34]
push edx
call sub.ADVAPI32.DLL_RegCloseKey
lea ecx, [ebp - 0x38]
push ecx
push 0x5103e4
push reloc.WS2_32.DLL_bind
call sub.ADVAPI32.DLL_RegCreateKeyA
test eax, eax
jne 0x407315
push 4
push 0x521b16
push 4
push 0
push str.DiskCacheSizeMb
mov eax, dword [ebp - 0x38]
push eax
call sub.ADVAPI32.DLL_RegSetValueExA
mov edx, dword [ebp - 0x38]
push edx
call sub.ADVAPI32.DLL_RegCloseKey
xor ebx, ebx
push edi
push 0x104
call sub.KERNEL32.DLL_GetCurrentDirectoryA
push str._nvdsproc.sys
push edi
call fcn.004e0e48
add esp, 8
lea eax, [ebp - 0x3c]
push 1
push eax
push 0x521ae4
push edi
push 0x510415
call fcn.004f096c
add esp, 0x14
dec eax
jne 0x40734e
jmp 0x407354
inc ebx
cmp ebx, 3
jl 0x407317
cmp ebx, 3
jl 0x40736d
mov eax, 0x12
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x407811
mov byte [0x521ae8], 1
push 0x18
call fcn.004d7228
pop ecx
mov dword [ebp - 4], eax
test eax, eax
je 0x40739d
mov word [ebp - 0x18], 0x24
mov edx, dword [ebp - 4]
push edx
call sub.KERNEL32.DLL_InitializeCriticalSection
mov word [ebp - 0x18], 0xc
mov ecx, dword [ebp - 4]
jmp 0x4073a0
mov ecx, dword [ebp - 4]
mov dword [0x54f648], ecx
push 4
lea eax, [ebp - 0x40]
push eax
push 0
push 0
push 0x222028
mov edx, dword [0x521ae4]
push edx
call fcn.004f09d0
add esp, 0x18
test eax, eax
jne 0x4073d4
mov dword [ebp - 0x2c], 2
jmp 0x4077f9
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x4073fb
mov dword [ebp - 0x2c], eax
mov ecx, dword [0x54f9fc]
mov edx, dword [ebp - 0x2c]
push edx
push str.GIS_d
push ecx
call fcn.004125e8
add esp, 0xc
jmp 0x4077f9
mov eax, dword [0x521ae9]
lea edx, [ebp - 0x2c]
push 4
push edx
movzx ecx, word [eax + 4]
add ecx, 0xfffffffd
lea edx, [ecx + ecx*8]
lea edx, [ecx + edx*8]
lea edx, [ecx + edx*2]
add edx, edx
add edx, 0x37a
push edx
push eax
mov eax, dword [0x521ae4]
push 0x222010
push eax
call fcn.004f09d0
add esp, 0x18
test eax, eax
jne 0x407443
mov dword [ebp - 0x2c], 2
jmp 0x4077f9
cmp dword [ebp - 0x2c], 0
je 0x407465
mov ecx, dword [ebp - 0x2c]
mov eax, dword [0x54f9fc]
push ecx
push str.UU_x
push eax
call fcn.004125e8
add esp, 0xc
jmp 0x4077f9
mov eax, dword [0x521af1]
lea edx, [ebp - 0x2c]
push 4
push edx
movzx edx, word [eax + 4]
dec edx
mov ecx, edx
shl ecx, 6
lea ecx, [ecx + ecx*4]
add ecx, 0x148
push ecx
push eax
mov eax, dword [0x521ae4]
push 0x222014
push eax
call fcn.004f09d0
add esp, 0x18
test eax, eax
jne 0x4074a8
mov dword [ebp - 0x2c], 2
jmp 0x4077f9
cmp dword [ebp - 0x2c], 0
je 0x4074b3
jmp 0x4077f9
mov dword [ebp - 0x44], esi
lea edx, [ebp - 0x48]
push 4
push edx
lea ecx, [ebp - 0x44]
push 4
push ecx
mov eax, dword [0x521ae4]
push 0x222018
push eax
call fcn.004f09d0
add esp, 0x18
test eax, eax
jne 0x4074e5
mov dword [ebp - 0x2c], 2
jmp 0x4077f9
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x40750d
mov dword [ebp - 0x2c], eax
push esi
mov edx, dword [ebp - 0x2c]
mov ecx, dword [0x54f9fc]
push edx
push str.LD_x__d
push ecx
call fcn.004125e8
add esp, 0x10
jmp 0x4077f9
xor edi, edi
push 0x10008
call fcn.004e0050
pop ecx
mov ebx, eax
test esi, esi
je 0x4075ae
cmp esi, 0x10000
jae 0x407530
mov eax, esi
jmp 0x407535
mov eax, 0x10000
mov dword [ebx], eax
mov dword [ebx + 4], edi
mov edx, dword [ebx]
push edx
mov ecx, dword [ebp + 0xc]
add ecx, edi
push ecx
lea ecx, [ebx + 8]
push ecx
call fcn.004e0b90
add esp, 0xc
lea eax, [ebp - 0x4c]
mov edx, dword [0x521ae4]
push 4
push eax
push 0x10008
push ebx
push 0x22201c
push edx
call fcn.004f09d0
add esp, 0x18
test eax, eax
jne 0x40757c
mov dword [ebp - 0x2c], 2
jmp 0x4075ae
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x4075a0
mov dword [ebp - 0x2c], eax
mov ecx, dword [0x54f9fc]
mov edx, dword [ebp - 0x2c]
push edx
push str.WD_x
push ecx
call fcn.004125e8
add esp, 0xc
jmp 0x4075ae
mov eax, dword [ebx]
sub esi, eax
add edi, eax
test esi, esi
jne 0x407524
push ebx
call fcn.004e0060
cmp dword [ebp - 0x2c], 0
pop ecx
je 0x4075c0
jmp 0x4077f9
mov edx, dword [ebp + 0x1c]
dec edx
mov esi, edx
shl esi, 5
add esi, edx
lea esi, [edx + esi*2]
shl esi, 2
add esi, 0x153
push esi
call fcn.004e0050
pop ecx
mov ebx, eax
push 0x46
mov eax, dword [ebp + 0x14]
push eax
push ebx
call fcn.004e0b90
add esp, 0xc
mov dl, byte [ebp + 0x1c]
mov byte [ebx + 0x46], dl
mov ecx, dword [ebp + 0x1c]
mov edi, ecx
shl ecx, 5
add ecx, edi
lea ecx, [edi + ecx*2]
shl ecx, 2
push ecx
mov eax, dword [ebp + 0x18]
push eax
lea edx, [ebx + 0x47]
push edx
call fcn.004e0b90
add esp, 0xc
lea ecx, [ebp - 0x50]
push 4
push ecx
push esi
push ebx
mov ecx, dword [0x521ae4]
push 0x222024
push ecx
call fcn.004f09d0
add esp, 0x18
test eax, eax
jne 0x407649
push ebx
call fcn.004e0060
pop ecx
mov dword [ebp - 0x2c], 2
jmp 0x4077f9
push ebx
call fcn.004e0060
pop ecx
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x407676
mov dword [ebp - 0x2c], eax
mov eax, dword [0x54f9fc]
mov edx, dword [ebp - 0x2c]
push edx
push str.US_status_x
push eax
call fcn.004125e8
add esp, 0xc
jmp 0x4077f9
mov byte [ebp - 0x56], 0
lea edx, [ebp - 0x5c]
push 4
push edx
lea ecx, [ebp - 0x56]
push 1
push ecx
mov eax, dword [0x521ae4]
push 0x222040
push eax
call fcn.004f09d0
add esp, 0x18
test eax, eax
jne 0x4076a9
mov dword [ebp - 0x2c], 2
jmp 0x4077f9
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x4076d0
mov dword [ebp - 0x2c], eax
mov ecx, dword [0x54f9fc]
mov edx, dword [ebp - 0x2c]
push edx
push str.USEX_status_x
push ecx
call fcn.004125e8
add esp, 0xc
jmp 0x4077f9
push 0x521afd
call fcn.00407914
pop ecx
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x4076e9
jmp 0x4077f9
push 0
push 0
push 0x52236e
call fcn.00406f7c
add esp, 0xc
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x4077f9
push 4
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
push 0x222004
mov edx, dword [0x521ae4]
push edx
call fcn.004f09d0
add esp, 0x18
test eax, eax
jne 0x407735
mov dword [ebp - 0x2c], 2
jmp 0x4077f9
cmp dword [ebp - 0x2c], 0
je 0x407757
mov ecx, dword [ebp - 0x2c]
mov eax, dword [0x54f9fc]
push ecx
push str.NO_d
push eax
call fcn.004125e8
add esp, 0xc
jmp 0x4077f9
mov edx, dword [0x521af1]
movzx ecx, word [edx + 4]
shl ecx, 2
push ecx
call fcn.004e0050
pop ecx
mov dword [0x521af9], eax
xor ebx, ebx
jmp 0x4077b6
push 0x64004
call fcn.004e0050
mov esi, eax
mov edx, ebx
shl edx, 3
mov eax, dword [0x521af9]
pop ecx
mov dword [eax + ebx*4], esi
mov ecx, dword [0x521af1]
lea edx, [edx + edx*4]
test byte [ecx + edx*8 + 0xb], 0x80
setne cl
and ecx, 1
test cl, cl
je 0x4077b5
mov eax, dword [0x521af9]
push esi
push ebx
call fcn.0040c490
add esp, 8
inc ebx
mov edx, dword [0x521af1]
movzx ecx, word [edx + 4]
cmp ebx, ecx
jl 0x407774
call fcn.00406efc
push 0x51fd18
call fcn.0040795c
pop ecx
mov eax, dword [0x54f63e]
mov dl, byte [eax]
and edx, 1
push edx
call fcn.0040803c
pop ecx
mov eax, dword [0x54f63e]
xor edx, edx
mov dl, byte [eax + 0x8f]
push edx
call fcn.0040807c
pop ecx
cmp dword [ebp - 0x2c], 0
je 0x407804
call fcn.0040783c
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret