Function at 0x40d520
Capabilities:
Check os version
Create directory
Delete registry key
Get disk information
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x29
push 0
push 0
dec ecx
jne 0x40d528
push ebx
push esi
push edi
mov esi, 0x41ab34
mov edi, 0x41ab68
mov ebx, 0x41abab
xor eax, eax
push ebp
push 0x40ea55
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, edi
mov edx, 0x40ea6c
call fcn.0040325c
cmp byte [0x41abac], 0x66
jne 0x40d5b5
mov eax, edi
mov edx, 0x40ead0
call fcn.0040325c
mov eax, dword [0x4192d4]
push eax
push 0x400
lea eax, [ebp - 4]
push eax
mov ecx, dword [0x41ace8]
mov edx, dword [0x41ad14]
mov eax, 0x80000002
call fcn.00405e40
mov edx, dword [ebp - 4]
mov eax, 0x41ab40
call fcn.0040325c
cmp byte [0x41aba9], 0
jne 0x40d5b5
push 0x2710
call sub.kernel32.dll_Sleep
mov eax, edi
mov edx, 0x40eb8c
call fcn.0040325c
mov ecx, dword [0x41ace8]
mov edx, dword [0x41ad14]
mov eax, 0x80000002
call fcn.00406264
lea eax, [ebp - 8]
call fcn.00405b84
mov edx, dword [ebp - 8]
mov eax, 0x41ab30
call fcn.0040325c
lea eax, [ebp - 0xc]
call fcn.00405bf0
mov edx, dword [ebp - 0xc]
mov eax, esi
call fcn.0040325c
mov eax, edi
mov edx, 0x40ebb4
call fcn.0040325c
mov eax, 0x41ab38
mov ecx, 0x40ec70
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [0x41ab40]
call fcn.0040338c
test eax, eax
jne 0x40d63b
mov eax, 0x41ab40
mov ecx, dword [0x41acd8]
mov edx, dword [esi]
call fcn.004033d8
mov eax, 0x4191e8
mov ecx, dword [0x4191e8]
mov edx, dword [esi]
call fcn.004033d8
mov eax, edi
mov edx, 0x40ec80
call fcn.0040325c
mov eax, 0x41ab28
mov ecx, dword [0x41acd0]
mov edx, dword [0x4191e8]
call fcn.004033d8
mov eax, edi
mov edx, 0x40ed18
call fcn.0040325c
mov eax, 0x41ab2c
mov ecx, dword [0x41acd4]
mov edx, dword [0x4191e8]
call fcn.004033d8
xor eax, eax
mov dword [0x41abb0], eax
call fcn.0040fc74
mov eax, edi
mov edx, 0x40ed94
call fcn.0040325c
cmp byte [0x41aba9], 0
je 0x40d914
mov eax, dword [0x41ad94]
call fcn.00405130
push 0xbb8
call sub.kernel32.dll_Sleep
call fcn.00405d60
mov eax, edi
mov edx, 0x40edf0
call fcn.0040325c
lea eax, [ebp - 0x10]
mov ecx, dword [0x41ad50]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x10]
call fcn.00404fdc
lea eax, [ebp - 0x14]
mov ecx, dword [0x41ad54]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x14]
call fcn.00404fdc
mov eax, dword [0x41ab28]
call fcn.00404fdc
mov eax, edi
mov edx, 0x40ee54
call fcn.0040325c
mov ecx, dword [0x41acd8]
mov edx, dword [0x41ad38]
mov eax, 0x80000002
call fcn.00406264
mov ecx, dword [0x41acd8]
mov edx, dword [0x41ad40]
mov eax, 0x80000002
call fcn.00406264
mov ecx, dword [0x41acd8]
mov edx, dword [0x41ad3c]
mov eax, 0x80000001
call fcn.00406264
mov ecx, dword [0x41acdc]
mov edx, dword [0x41ad38]
mov eax, 0x80000001
call fcn.00406264
mov ecx, dword [0x41ace0]
mov edx, dword [0x41ad3c]
mov eax, 0x80000002
call fcn.00406264
lea eax, [ebp - 0x18]
mov ecx, dword [0x41acec]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x18]
call fcn.00404fdc
lea eax, [ebp - 0x1c]
mov ecx, dword [0x41acf0]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x1c]
call fcn.00404fdc
lea eax, [ebp - 0x20]
mov ecx, dword [0x41acf4]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x20]
call fcn.00404fdc
lea eax, [ebp - 0x24]
mov ecx, dword [0x41acf8]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x24]
call fcn.00404fdc
lea eax, [ebp - 0x28]
mov ecx, dword [0x41acfc]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x28]
call fcn.00404fdc
lea eax, [ebp - 0x2c]
mov ecx, dword [0x41ad00]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x2c]
call fcn.00404fdc
lea eax, [ebp - 0x30]
mov ecx, dword [0x41ad04]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x30]
call fcn.00404fdc
mov eax, dword [0x41ad48]
call fcn.0040358c
push eax
push 0x80000002
call sub.advapi32.dll_RegDeleteKeyA
mov eax, dword [0x41ad14]
call fcn.0040358c
push eax
push 0x80000002
call sub.advapi32.dll_RegDeleteKeyA
mov eax, 0x40ee90
call fcn.00413c20
mov eax, 0x40ee9c
call fcn.00413c20
mov eax, edi
mov edx, 0x40eea8
call fcn.0040325c
mov eax, 0x40ef80
call fcn.00413c20
mov eax, dword [0x41ab2c]
call fcn.00404fdc
push 0x200040
push 0x40ef84
push 0x40ef90
lea edx, [ebp - 0x38]
mov eax, 0x9f
call fcn.004048e0
push dword [ebp - 0x38]
push 0x40ef9c
lea eax, [ebp - 0x34]
mov edx, 3
call fcn.0040344c
mov eax, dword [ebp - 0x34]
call fcn.0040358c
push eax
push 0
call sub.user32.dll_MessageBoxA_1
push 1
push 0
push 0
lea eax, [ebp - 0x3c]
mov ecx, dword [0x41ad94]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x3c]
call fcn.0040358c
push eax
push 0x40efb4
push 0
mov eax, dword [0x4192e8]
mov eax, dword [eax]
call eax
mov eax, dword [0x41ab40]
call fcn.00405034
jmp 0x40ea17
push 0
mov eax, dword [0x4191e8]
call fcn.0040358c
push eax
call sub.kernel32.dll_CreateDirectoryA
call sub.kernel32.dll_GetVersion_1
and eax, 0xffff
and eax, 0xff
cmp ax, 5
setb byte [0x41aba8]
cmp byte [0x41aba8], 0
je 0x40d94e
call fcn.00405498
mov eax, edi
mov edx, 0x40efc4
call fcn.0040325c
mov eax, dword [0x4192d4]
push eax
mov ecx, dword [0x41ad24]
mov edx, dword [0x41ad14]
mov eax, 0x80000002
call fcn.00405d8c
push eax
call fcn.00404b38
pop edx
sub eax, edx
cmp eax, 0x1e
jl 0x40ea17
mov eax, edi
mov edx, 0x40efe0
call fcn.0040325c
lea edx, [ebp - 0x40]
mov eax, dword [0x41ab40]
call fcn.00404b68
mov edx, dword [ebp - 0x40]
mov eax, 0x41ab44
call fcn.0040325c
call fcn.00402720
push 1
push 0x96
push 0x7a120
lea eax, [ebp - 0x44]
mov ecx, dword [0x41acec]
mov edx, dword [esi]
call fcn.004033d8
mov edx, dword [ebp - 0x44]
mov cl, 1
mov eax, dword [0x41ab40]
call fcn.00404d2c
mov byte [ebx], al
lea eax, [ebp - 0x48]
mov ecx, dword [0x41acec]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x48]
call fcn.00405ce0
mov byte [ebx], al
mov eax, edi
mov edx, 0x40f034
call fcn.0040325c
mov eax, dword [0x4192d4]
push eax
mov ecx, dword [0x41accc]
mov edx, dword [0x41ad14]
mov eax, 0x80000002
call fcn.00405d8c
mov dword [0x41aba0], eax
cmp dword [0x41aba0], 0x9f
jge 0x40db1c
cmp byte [ebx], 0
jne 0x40da92
lea eax, [ebp - 0x4c]
mov ecx, dword [0x41acec]
mov edx, dword [esi]
call fcn.004033d8
mov edx, dword [ebp - 0x4c]
mov eax, dword [0x41ab40]
call fcn.004034d8
je 0x40da92
mov eax, dword [0x41acec]
call fcn.00405130
push 1
push 0x96
push 0x7a120
lea eax, [ebp - 0x50]
mov ecx, dword [0x41acec]
mov edx, dword [esi]
call fcn.004033d8
mov edx, dword [ebp - 0x50]
mov cl, 1
mov eax, dword [0x41ab40]
call fcn.00404d2c
mov byte [ebx], al
cmp byte [ebx], 0
je 0x40db1c
push 0x9f
mov ecx, dword [0x41accc]
mov edx, dword [0x41ad14]
mov eax, 0x80000002
call fcn.00406004
mov byte [ebx], al
cmp dword [0x41aba0], 0
jle 0x40dae2
lea edx, [ebp - 0x54]
mov eax, dword [0x41aba0]
call fcn.004048e0
mov ecx, dword [ebp - 0x54]
mov eax, 0x41ab3c
mov edx, 0x40f09c
call fcn.004033d8
jmp 0x40daec
mov eax, 0x41ab3c
call fcn.00403208
push 0x40f0ac
lea edx, [ebp - 0x5c]
mov eax, 0x9f
call fcn.004048e0
push dword [ebp - 0x5c]
push dword [0x41ab3c]
lea eax, [ebp - 0x58]
mov edx, 3
call fcn.0040344c
mov eax, dword [ebp - 0x58]
call fcn.0040fd78
mov eax, edi
mov edx, 0x40f0c0
call fcn.0040325c
call fcn.0040cb6c
push 1
push 0x96
push 0x7a120
lea eax, [ebp - 0x60]
mov ecx, dword [0x41acf0]
mov edx, dword [esi]
call fcn.004033d8
mov edx, dword [ebp - 0x60]
xor ecx, ecx
mov eax, dword [0x41ab40]
call fcn.00404d2c
mov byte [ebx], al
lea eax, [ebp - 0x64]
mov ecx, dword [0x41acf0]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x64]
call fcn.00405ce0
mov byte [ebx], al
mov eax, edi
mov edx, 0x40f18c
call fcn.0040325c
push 1
push 0x96
push 0x7a120
lea eax, [ebp - 0x68]
mov ecx, dword [0x41acf4]
mov edx, dword [esi]
call fcn.004033d8
mov edx, dword [ebp - 0x68]
xor ecx, ecx
mov eax, dword [0x41ab40]
call fcn.00404d2c
mov byte [ebx], al
lea eax, [ebp - 0x6c]
mov ecx, dword [0x41acf4]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x6c]
call fcn.00405ce0
mov byte [ebx], al
lea eax, [ebp - 0x70]
mov ecx, dword [0x41ad04]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x70]
call fcn.00404dc0
test al, al
jne 0x40dc57
push 1
push 0
push 0x7a120
lea eax, [ebp - 0x74]
mov ecx, dword [0x41ad00]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x74]
push eax
lea eax, [ebp - 0x78]
mov ecx, dword [0x41acf8]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x78]
xor ecx, ecx
pop edx
call fcn.00404d2c
mov byte [ebx], al
push 1
push 0
push 0x7a120
lea eax, [ebp - 0x7c]
mov ecx, dword [0x41ad04]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x7c]
push eax
lea eax, [ebp - 0x80]
mov ecx, dword [0x41acfc]
mov edx, dword [esi]
call fcn.004033d8
mov eax, dword [ebp - 0x80]
xor ecx, ecx
pop edx
call fcn.00404d2c
mov byte [ebx], al
lea eax, [ebp - 0x84]
mov ecx, dword [0x41acf8]
mov edx, dword [esi]