Function at 0x405980
Capabilities:
Create thread
Get disk information
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
push ebx
push esi
push edi
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov esi, dword [ebp - 0x104]
cmp esi, 4
jbe 0x4059a5
dec esi
cmp esi, 1
ja 0x4059c0
push str.Error_threads_count___1___set_to_2_n
call fcn.00406130
add esp, 4
mov dword [ebp - 0xc], 2
jmp 0x4059cd
mov eax, 0x10
cmp esi, eax
cmova esi, eax
mov dword [ebp - 0xc], esi
push 0x68
lea eax, [ebp - 0x8c]
push 0
push eax
call fcn.00410280
push 0x104
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.00410280
push 0x68
lea eax, [ebp - 0xf4]
push 0
push eax
call fcn.00410280
add esp, 0x24
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
xor ecx, ecx
mov dword [ebp - 4], eax
xor ebx, ebx
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], ecx
test eax, eax
je 0x405aeb
xor esi, esi
movzx eax, byte [ebp + ebx - 0x21c]
lea edi, [ebp - 0x8c]
add edi, esi
mov byte [edi], al
movzx eax, byte [ebp + ebx - 0x21b]
mov byte [ebp + esi - 0x8b], al
movzx eax, byte [ebp + ebx - 0x21a]
add ebx, 4
mov byte [ebp + esi - 0x8a], al
mov al, byte [edi]
cmp al, 0x41
je 0x405adf
cmp al, 0x61
je 0x405adf
push edi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
je 0x405aa6
cmp eax, 3
je 0x405aa6
cmp eax, 6
je 0x405aa6
cmp eax, 4
jne 0x405a95
mov dword [ebp + esi - 0xf4], 2
jmp 0x405ab4
push edi
push eax
push str.Uknonwn_DrvType___d__of_root:__s__skipped_n
call fcn.00406130
add esp, 0xc
jmp 0x405adf
inc dword [ebp - 8]
mov dword [ebp + esi - 0xf4], 1
mov ecx, dword [ebp - 0x10]
inc ecx
mov dword [ebp - 0x10], ecx
lea esi, [ecx*4]
push dword [ebp + esi - 0xf8]
lea eax, [ebp + esi - 0x90]
push eax
push ecx
push str.Found_disk___d___s___type:__d_n
call fcn.00406130
add esp, 0x10
cmp ebx, dword [ebp - 4]
jb 0x405a30
mov ecx, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ebx, dword [ebp - 0xc]
test ecx, ecx
mov esi, ebx
setne al
sub esi, eax
mov dword [ebp - 0x20], eax
lea eax, [edi + 0x15a4]
mov dword [ebp - 0x18], esi
push eax
mov dword [edi + 0x15bc], 0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
test ebx, ebx
je 0x405b97
lea esi, [edi + 0xe50]
nop dword [eax]
nop word [eax + eax]
push 0x3d38
mov dword [esi - 0xc], 2
mov dword [esi - 8], edi
call fcn.00406370
mov dword [esi], eax
add esp, 4
mov dword [eax + 8], 0
mov eax, dword [esi]
mov dword [eax + 4], 0
lea eax, [esi + 4]
push eax
mov dword [eax], 0
mov dword [esi + 8], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x18], 0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea esi, [esi + 0x30]
sub ebx, 1
jne 0x405b30
mov esi, dword [ebp - 0x18]
cmp byte [edi + 0x190], 0
lea edx, [edi + 0x190]
mov dword [ebp - 8], edx
je 0x405c01
mov eax, 1
test esi, esi
mov dword [edi + 0xe38], eax
cmove esi, eax
mov eax, dword [edi + 0xe50]
mov dword [ebp - 0x18], esi
mov dword [eax + 8], 1
mov al, byte [edx]
test al, al
je 0x405c01
mov esi, 0xc
nop dword [eax]
nop dword [eax + eax]
movsx cx, al
lea edx, [edx + 1]
mov eax, dword [edi + 0xe50]
lea esi, [esi + 2]
mov word [esi + eax - 2], cx
mov al, byte [edx]
test al, al
jne 0x405be0
lea edx, [edi + 0x190]
mov ecx, dword [ebp - 0x10]
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
cmp byte [edx], bl
jne 0x405cd6
cmp dword [edi + 0x18c], ebx
jne 0x405cd6
xor eax, eax
mov dword [ebp - 4], eax
test ecx, ecx
jle 0x405cd6
nop word [eax + eax]
lea ecx, [eax*4]
cmp dword [ebp + ecx - 0xf4], 2
jne 0x405cc4
lea esi, [ebp - 0x8c]
add esi, ecx
push edx
push esi
call fcn.004080d0
add esp, 8
test eax, eax
jne 0x405cbb
lea eax, [ebx + ebx*2]
shl eax, 4
add edi, eax
cmp byte [esi], 0
mov eax, dword [edi + 0xe50]
mov eax, dword [eax + 8]
je 0x405c9a
imul edx, eax, 0x20a
add edx, 0xc
nop word [eax + eax]
movsx cx, byte [esi]
lea esi, [esi + 1]
mov eax, dword [edi + 0xe50]
lea edx, [edx + 2]
mov word [edx + eax - 2], cx
cmp byte [esi], 0
jne 0x405c80
mov eax, dword [edi + 0xe50]
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp + 8]
inc dword [eax + 8]
cmp esi, 1
jle 0x405cb6
lea eax, [ebx + 1]
cdq
idiv esi
mov ebx, edx
mov edx, dword [ebp - 8]
jmp 0x405cc1
lea edx, [edi + 0x190]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
inc eax
mov dword [ebp - 4], eax
cmp eax, ecx
jl 0x405c30
mov dword [ebp - 0x1c], ebx
cmp byte [edx], 0
jne 0x405d79
xor eax, eax
mov dword [ebp - 4], eax
test ecx, ecx
jle 0x405d79
mov ebx, dword [ebp - 0x18]
nop
lea ecx, [eax*4]
cmp dword [ebp + ecx - 0xf4], 1
jne 0x405d69
lea esi, [ebp - 0x8c]
add esi, ecx
push edx
push esi
call fcn.004080d0
add esp, 8
test eax, eax
jne 0x405d63
lea eax, [ebx + ebx*2]
shl eax, 4
add edi, eax
cmp byte [esi], 0
mov eax, dword [edi + 0xe50]
mov eax, dword [eax + 8]
je 0x405d5a
imul edx, eax, 0x20a
add edx, 0xc
nop word [eax + eax]
movsx cx, byte [esi]
lea esi, [esi + 1]
mov eax, dword [edi + 0xe50]
lea edx, [edx + 2]
mov word [edx + eax - 2], cx
cmp byte [esi], 0
jne 0x405d40
mov eax, dword [edi + 0xe50]
inc dword [eax + 8]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov edi, dword [ebp + 8]
inc eax
mov dword [ebp - 4], eax
cmp eax, dword [ebp - 0x10]
jl 0x405cf0
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
mov dword [edi + 0xe3c], eax
mov eax, dword [ebp - 0xc]
mov dword [edi + 0xe40], ecx
mov dword [edi + 0x1184], eax
test eax, eax
je 0x405ddb
lea esi, [edi + 0x1194]
lea ebx, [edi + 0x1488]
nop word [eax + eax]
mov dword [ebx], 0
push 0x3d38
mov dword [esi - 8], edi
call fcn.00406370
add esp, 4
mov dword [esi], eax
sub dword [ebp - 0xc], 1
lea ebx, [ebx + 4]
lea esi, [esi + 0x30]
mov dword [eax + 8], 1
jne 0x405db0
lea eax, [edi + 0x14c8]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov ecx, dword [edi + 0xe3c]
add ecx, dword [edi + 0xe40]
mov dword [ebp - 0x10], ecx
test ecx, ecx
jle 0x405e34
lea eax, [edi + 0xe44]
mov ebx, ecx
lea esi, [edi + 0x1144]
mov edi, eax
nop dword [eax + eax]
push 0
push 0
push edi
push 0x407ca0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
add edi, 0x30
mov dword [esi], eax
lea esi, [esi + 4]
sub ebx, 1
jne 0x405e10
mov edi, dword [ebp + 8]
push 0x190
mov dword [ebp - 0x24], 0
call fcn.00406370
mov ebx, eax
add esp, 4
mov dword [ebp - 8], ebx
xor esi, esi
nop
push 0x105
call fcn.00406370
mov dword [ebx + esi*4], eax
add esp, 4
inc esi
cmp esi, 0x64
jl 0x405e50
cmp byte [edi + 0x190], 0
lea edx, [edi + 0x190]
mov ebx, dword [ebp - 0x1c]
mov esi, dword [ebp - 8]
jne 0x405e92
push 0x64
push 0
lea eax, [ebp - 0x24]
push eax
push esi
call fcn.00404b40
add esp, 0x10
lea edx, [edi + 0x190]
cmp dword [edi + 0x18c], 0
jne 0x405fce
cmp dword [ebp - 0x24], 0
mov dword [ebp - 4], 0
jle 0x405fce
mov dword [ebp - 0xc], esi
mov eax, dword [esi]
cmp byte [eax], 0
je 0x405fb2
xor ecx, ecx
cmp byte [ecx + eax + 1], 0
lea ecx, [ecx + 1]
jne 0x405ec0
cmp byte [ecx + eax - 1], 0x5c
je 0x405edc
mov byte [ecx + eax], 0x5c
mov eax, dword [esi]
mov byte [eax + ecx + 1], 0
push edx
push dword [esi]
call fcn.004080d0
add esp, 8
test eax, eax
jne 0x405fb2
mov esi, ebx
lea eax, [ebx + ebx*2]
add eax, eax
mov eax, dword [edi + eax*8 + 0xe50]
mov ecx, dword [eax + 8]
cmp ecx, 0x1e
jne 0x405f21
mov ecx, dword [ebp - 0x18]
cmp ecx, 1
jle 0x405f18
lea eax, [ebx + 1]
cdq
idiv ecx
mov ebx, edx
mov dword [ebp - 0x1c], ebx
cmp ebx, esi
jne 0x405ef1
jmp 0x405fce
mov eax, dword [ebp - 0xc]
xor esi, esi
mov eax, dword [eax]
mov al, byte [eax]
mov byte [ebp - 0x11], al
test al, al
je 0x405f74
lea eax, [ebx + ebx*2]
imul edx, ecx, 0x20a
shl eax, 4
add edi, 0xe50
add eax, edi
mov edi, dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
mov al, byte [ebp - 0x11]
mov ebx, dword [ebp - 0x20]
add edx, 0xc
movsx cx, al
lea esi, [esi + 1]
mov eax, dword [ebx]
lea edx, [edx + 2]
mov word [edx + eax - 2], cx
mov eax, dword [edi]
mov al, byte [esi + eax]
test al, al
jne 0x405f54
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp + 8]
lea esi, [ebx + ebx*2]
shl esi, 4
add esi, edi
lea edi, [esi + 0xe54]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0xe50]
push edi
inc dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0xc]
cmp ecx, 1
jle 0x405fb2
lea eax, [ebx + 1]
cdq
idiv ecx
mov ebx, edx
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp - 4]
lea edx, [edi + 0x190]
inc eax
add esi, 4
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], esi
cmp eax, dword [ebp - 0x24]
jl 0x405eb3
mov ebx, dword [ebp - 0x10]
test ebx, ebx
jle 0x406000
lea esi, [edi + 0xe54]
nop dword [eax + eax]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi - 4]
push esi
mov dword [eax + 4], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add esi, 0x30
sub ebx, 1
jne 0x405fe0
mov ebx, dword [ebp - 8]
xor esi, esi
push dword [ebx + esi*4]
call fcn.004063c0
inc esi
add esp, 4
cmp esi, 0x64
jl 0x406005
push ebx
call fcn.004063c0
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret