Function at 0x403580
Capabilities:
Get disk information
Get disk size
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x53f9e7
mov eax, dword fs:[0]
push eax
sub esp, 0x4b0
mov eax, dword [0x594aa4]
xor eax, esp
mov dword [esp + 0x4a8], eax
push ebx
push esi
push edi
mov eax, dword [0x594aa4]
xor eax, esp
push eax
lea eax, [esp + 0x4c0]
mov dword fs:[0], eax
mov edi, ecx
push 9
xor eax, eax
xor esi, esi
push 0x57d4b8
lea ecx, [esp + 0x80]
mov dword [esp + 0x20], edi
mov dword [esp + 0x98], 7
mov dword [esp + 0x94], esi
mov word [esp + 0x84], ax
call fcn.00408820
push 0xa
push str._nNwmpe
lea ecx, [esp + 0x80]
mov dword [esp + 0x4d0], esi
call fcn.00408700
push 0x208
lea edx, [esp + 0x9a]
xor ecx, ecx
push esi
push edx
mov dword [esp + 0x3c], 1
mov dword [esp + 0x38], 0x400
mov word [esp + 0xa0], cx
call fcn.004804c0
mov eax, dword [esp + 0x88]
mov ebx, 8
add esp, 0xc
mov byte [esp + 0x17], 0
cmp dword [esp + 0x90], ebx
jae 0x40365f
lea eax, [esp + 0x7c]
lea ecx, [esp + 0x28]
push ecx
push 1
push esi
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4037d7
lea edx, [esp + 0x2c]
push edx
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0x38]
push ecx
push esi
push str.BasePath
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x94]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x4036b3
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x92], 0x5c
je 0x40371c
lea eax, [esp + 0x94]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x4036d7
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x92], 0x2f
je 0x40371c
lea eax, [esp + 0x94]
lea edx, [eax + 2]
jmp 0x403700
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x403700
sub eax, edx
sar eax, 1
mov ecx, 0x5c
mov word [esp + eax*2 + 0x94], cx
lea edx, [edi + 0x90]
push edx
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0x64]
push ecx
call fcn.0040ac80
add esp, 0xc
push 0xffffffffffffffff
push 0
lea esi, [edi + 0x18]
push eax
mov ecx, esi
mov byte [esp + 0x4d4], 1
call fcn.00406e30
mov byte [esp + 0x4c8], 0
cmp dword [esp + 0x74], ebx
jb 0x40376a
mov edx, dword [esp + 0x60]
push edx
call fcn.0044687d
add esp, 4
mov ebx, dword [edi + 0x50]
mov edi, dword [edi + 0x54]
push 3
push 0
lea eax, [esp + 0x64]
push eax
mov ecx, esi
call fcn.00405ce0
cmp dword [esp + 0x74], 8
mov eax, dword [esp + 0x60]
jae 0x40378f
lea eax, [esp + 0x60]
push 0
push 0
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
cmp edi, dword [esp + 0x20]
jg 0x4037b1
jl 0x4037ad
cmp ebx, dword [esp + 0x1c]
jae 0x4037b1
mov bl, 1
jmp 0x4037b5
mov bl, byte [esp + 0x17]
cmp dword [esp + 0x74], 8
jb 0x4037c9
mov edx, dword [esp + 0x60]
push edx
call fcn.0044687d
add esp, 4
mov edi, dword [esp + 0x18]
test bl, bl
jne 0x403923
xor esi, esi
push 0x208
lea ecx, [esp + 0x2aa]
xor eax, eax
push esi
push ecx
mov dword [esp + 0x40], esi
xor ebx, ebx
mov word [esp + 0x2b0], ax
call fcn.004804c0
add esp, 0xc
lea esi, [esp + 0x2a4]
mov edx, esi
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403817
sub eax, edx
sar eax, 1
je 0x4038b5
lea esp, [esp]
xor eax, eax
push eax
push eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov eax, dword [esp + 0x20]
cmp eax, ebx
jl 0x403880
mov ecx, dword [esp + 0x1c]
jg 0x40385c
cmp ecx, dword [esp + 0x34]
jbe 0x403880
mov ebx, eax
mov eax, esi
mov dword [esp + 0x34], ecx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403867
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [edi + 0x18]
call fcn.00408820
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403885
sub eax, edx
sar eax, 1
lea esi, [esi + eax*2 + 2]
mov eax, esi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4038a0
sub eax, edx
sar eax, 1
jne 0x403830
push 0xe
lea esi, [edi + 0x18]
push str.Program_Files_
mov ecx, esi
call fcn.00408700
push 0xa
push str._nNwmpe
mov ecx, esi
call fcn.00408700
lea ecx, [edi + 0x90]
push ecx
lea edx, [esp + 0x60]
push 0x57d450
push edx
call fcn.0040ac80
add esp, 0xc
push 0xffffffffffffffff
push 0
push eax
mov ecx, esi
mov byte [esp + 0x4d4], 2
call fcn.004085f0
mov ebx, 8
mov byte [esp + 0x4c8], 0
cmp dword [esp + 0x74], ebx
jb 0x403928
mov eax, dword [esp + 0x60]
push eax
call fcn.0044687d
add esp, 4
jmp 0x403928
mov ebx, 8
push 0xffffffffffffffff
push 0
push esi
lea ecx, [edi + 0x2d4]
call fcn.00406e30
push 0x57d450
lea ecx, [esp + 0x44]
push esi
push ecx
call fcn.0040ad40
lea edx, [edi + 0x154]
push edx
push eax
lea eax, [esp + 0x70]
push eax
mov byte [esp + 0x4e0], 3
call fcn.0040abd0
add esp, 0x18
push 0xffffffffffffffff
push 0
push eax
lea ecx, [edi + 0x34]
mov byte [esp + 0x4d4], 4
call fcn.00406e30
cmp dword [esp + 0x74], ebx
jb 0x40398d
mov ecx, dword [esp + 0x60]
push ecx
call fcn.0044687d
add esp, 4
xor edx, edx
mov dword [esp + 0x74], 7
mov dword [esp + 0x70], 0
mov word [esp + 0x60], dx
cmp dword [esp + 0x58], ebx
jb 0x4039b7
mov eax, dword [esp + 0x44]
push eax
call fcn.0044687d
add esp, 4
cmp dword [esp + 0x90], ebx
jb 0x4039cd
mov ecx, dword [esp + 0x7c]
push ecx
call fcn.0044687d
add esp, 4
mov ecx, dword [esp + 0x4c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4a8]
xor ecx, esp
call fcn.0047ff9f
mov esp, ebp
pop ebp
ret