Function at 0x40f9c0
Capabilities:
Access peb ldr_data
Get disk information
Get disk size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x468f08
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x48d1d0]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
xor edi, edi
lea esi, [esp + 0x20]
mov dword [esp + 0x30], edi
call fcn.0040fd20
mov dword [esp + 0x60], edi
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
mov esi, dword [ebp + 0xc]
push esi
lea ecx, [esp + 0x20]
mov byte [esp + 0x64], 1
call fcn.00401f10
mov eax, dword [eax]
mov ebx, dword [eax - 0xc]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x30], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fa58
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x1c], edi
cmp ebx, edi
jg 0x40faa6
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x20]
cmp dword [ecx - 0xc], edi
je 0x40fa71
lea eax, [esp + 0x14]
mov esi, dword [eax]
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [esi - 4], edi
lea ecx, [esi - 4]
jl 0x40fc76
cmp eax, dword [esi - 0x10]
jne 0x40fc76
lea ebx, [esi - 0x10]
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x40fcaf
mov esi, dword [ebp + 0xc]
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x60], 2
movzx ecx, word [esi + edi*2]
push ecx
lea edx, [esp + 0x1c]
push 0x47859c
push edx
call fcn.004017e0
mov cx, word [esi + edi*2]
add esp, 0xc
lea ebx, [esp + 0x28]
call fcn.004101c0
push eax
lea eax, [esp + 0x28]
push eax
mov ebx, 0x4785c4
mov byte [esp + 0x68], 3
call fcn.0040a210
add esp, 8
mov byte [esp + 0x60], 4
mov eax, dword [eax]
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40fc6c
mov ecx, dword [esp + 0x20]
push eax
push ecx
call fcn.0044b245
add esp, 8
test eax, eax
mov byte [esp + 0x60], 3
mov eax, dword [esp + 0x24]
sete bl
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40fb4c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x60], 2
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fb71
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x40fb86
mov byte [esp + 0x60], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
jmp 0x40fc3d
mov ebx, dword [esp + 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0x40fc35
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x54]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x40fc35
mov ecx, dword [esp + 0x40]
cmp ecx, dword [esp + 0x38]
jb 0x40fc35
mov eax, dword [esp + 0x3c]
ja 0x40fbce
cmp eax, dword [esp + 0x34]
jbe 0x40fc35
mov esi, dword [esp + 0x14]
mov dword [esp + 0x34], eax
lea eax, [ebx - 0x10]
add esi, 0xfffffff0
mov dword [esp + 0x38], ecx
cmp eax, esi
je 0x40fc35
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40fc23
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x40fc23
push eax
call fcn.004018a0
add esp, 4
mov dword [esp + 0x2c], eax
or edx, 0xffffffff
lock xadd dword [edi], edx
dec edx
test edx, edx
jg 0x40fc16
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov eax, dword [esp + 0x2c]
add eax, 0x10
mov dword [esp + 0x14], eax
jmp 0x40fc31
mov eax, dword [ebx - 0xc]
push eax
push ebx
lea ecx, [esp + 0x1c]
call fcn.00401e10
mov edi, dword [esp + 0x1c]
mov byte [esp + 0x60], 1
lea eax, [ebx - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fc56
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc edi
mov dword [esp + 0x1c], edi
cmp edi, dword [esp + 0x30]
jl 0x40faa3
xor edi, edi
jmp 0x40fa60
push 0x80004005
call fcn.00401dc0
mov ecx, dword [esi - 0xc]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov ebx, eax
cmp ebx, edi
jne 0x40fc8f
call fcn.00401cd0
mov eax, dword [esi - 0xc]
mov dword [ebx + 4], eax
mov eax, dword [esi - 0xc]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [ebx + 0x10]
push eax
call fcn.00448f3b
add esp, 0x10
mov esi, dword [ebp + 8]
mov byte [esp + 0x60], 0
mov eax, dword [esp + 0x14]
add ebx, 0x10
add eax, 0xfffffff0
mov dword [esi], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fcdc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x60], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fd04
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret