Function at 0x4058d0
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 0x4058f5
dec esi
cmp esi, 1
ja 0x405910
push str.Error_threads_count___1___set_to_2_n
call fcn.00406020
add esp, 4
mov dword [ebp - 0xc], 2
jmp 0x40591d
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.0040f640
push 0x104
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.0040f640
push 0x68
lea eax, [ebp - 0xf4]
push 0
push eax
call fcn.0040f640
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 0x405a3b
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 0x405a2f
cmp al, 0x61
je 0x405a2f
push edi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
je 0x4059f6
cmp eax, 3
je 0x4059f6
cmp eax, 6
je 0x4059f6
cmp eax, 4
jne 0x4059e5
mov dword [ebp + esi - 0xf4], 2
jmp 0x405a04
push edi
push eax
push str.Uknonwn_DrvType___d__of_root:__s__skipped_n
call fcn.00406020
add esp, 0xc
jmp 0x405a2f
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.00406020
add esp, 0x10
cmp ebx, dword [ebp - 4]
jb 0x405980
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 0x405ae7
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.00406260
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 0x405a80
mov esi, dword [ebp - 0x18]
cmp byte [edi + 0x190], 0
lea edx, [edi + 0x190]
mov dword [ebp - 8], edx
je 0x405b51
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 0x405b51
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 0x405b30
lea edx, [edi + 0x190]
mov ecx, dword [ebp - 0x10]
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
cmp byte [edx], bl
jne 0x405c26
cmp dword [edi + 0x18c], ebx
jne 0x405c26
xor eax, eax
mov dword [ebp - 4], eax
test ecx, ecx
jle 0x405c26
nop word [eax + eax]
lea ecx, [eax*4]
cmp dword [ebp + ecx - 0xf4], 2
jne 0x405c14
lea esi, [ebp - 0x8c]
add esi, ecx
push edx
push esi
call fcn.00407490
add esp, 8
test eax, eax
jne 0x405c0b
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 0x405bea
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 0x405bd0
mov eax, dword [edi + 0xe50]
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp + 8]
inc dword [eax + 8]
cmp esi, 1
jle 0x405c06
lea eax, [ebx + 1]
cdq
idiv esi
mov ebx, edx
mov edx, dword [ebp - 8]
jmp 0x405c11
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 0x405b80
mov dword [ebp - 0x1c], ebx
cmp byte [edx], 0
jne 0x405cc9
xor eax, eax
mov dword [ebp - 4], eax
test ecx, ecx
jle 0x405cc9
mov ebx, dword [ebp - 0x18]
nop
lea ecx, [eax*4]
cmp dword [ebp + ecx - 0xf4], 1
jne 0x405cb9
lea esi, [ebp - 0x8c]
add esi, ecx
push edx
push esi
call fcn.00407490
add esp, 8
test eax, eax
jne 0x405cb3
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 0x405caa
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 0x405c90
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 0x405c40
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 0x405d2b
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.00406260
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 0x405d00
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 0x405d84
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 0x407060
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 0x405d60
mov edi, dword [ebp + 8]
push 0x190
mov dword [ebp - 0x24], 0
call fcn.00406260
mov ebx, eax
add esp, 4
mov dword [ebp - 8], ebx
xor esi, esi
nop
push 0x105
call fcn.00406260
mov dword [ebx + esi*4], eax
add esp, 4
inc esi
cmp esi, 0x64
jl 0x405da0
cmp byte [edi + 0x190], 0
lea edx, [edi + 0x190]
mov ebx, dword [ebp - 0x1c]
mov esi, dword [ebp - 8]
jne 0x405de2
push 0x64
push 0
lea eax, [ebp - 0x24]
push eax
push esi
call fcn.00404aa0
add esp, 0x10
lea edx, [edi + 0x190]
cmp dword [edi + 0x18c], 0
jne 0x405f1e
cmp dword [ebp - 0x24], 0
mov dword [ebp - 4], 0
jle 0x405f1e
mov dword [ebp - 0xc], esi
mov eax, dword [esi]
cmp byte [eax], 0
je 0x405f02
xor ecx, ecx
cmp byte [ecx + eax + 1], 0
lea ecx, [ecx + 1]
jne 0x405e10
cmp byte [ecx + eax - 1], 0x5c
je 0x405e2c
mov byte [ecx + eax], 0x5c
mov eax, dword [esi]
mov byte [eax + ecx + 1], 0
push edx
push dword [esi]
call fcn.00407490
add esp, 8
test eax, eax
jne 0x405f02
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 0x405e71
mov ecx, dword [ebp - 0x18]
cmp ecx, 1
jle 0x405e68
lea eax, [ebx + 1]
cdq
idiv ecx
mov ebx, edx
mov dword [ebp - 0x1c], ebx
cmp ebx, esi
jne 0x405e41
jmp 0x405f1e
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 0x405ec4
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 0x405ea4
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 0x405f02
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 0x405e03
mov ebx, dword [ebp - 0x10]
test ebx, ebx
jle 0x405f50
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 0x405f30
mov ebx, dword [ebp - 8]
xor esi, esi
push dword [ebx + esi*4]
call fcn.004062b0
inc esi
add esp, 4
cmp esi, 0x64
jl 0x405f55
push ebx
call fcn.004062b0
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret