Function at 0x410370
Capabilities:
Check os version
Get disk size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x374
mov eax, dword [0x48300c]
xor eax, esp
mov dword [esp + 0x370], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x10]
push ebx
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp + 0xc]
push esi
mov dword [esp + 0x10], ecx
xor esi, esi
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp + 0x14]
mov ebx, ecx
push edi
mov dword [esp + 0x34], edx
mov edi, ecx
mov edx, ecx
mov dword [esp + 0x2c], eax
and edx, 0x10
mov dword [eax + 8], 0xffffffff
and ecx, 2
mov dword [esp + 0x30], edx
and ebx, 8
mov dword [esp + 0x28], ecx
and edi, 4
cmp dword [esp + 0x14], esi
jne 0x4103fa
lea edx, [esp + 0x270]
call fcn.00410090
test eax, eax
jne 0x4107b1
lea eax, [esp + 0x270]
mov dword [esp + 0x18], eax
jmp 0x4103fe
mov eax, dword [esp + 0x18]
mov ecx, eax
call fcn.0040ff00
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x410427
mov eax, 7
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x370]
xor ecx, esp
call fcn.00475bd4
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x28], esi
mov edx, 0xc0000000
mov eax, SysReAllocStringLen
cmove edx, eax
mov dword [esp + 0x20], edx
cmp dword [esp + 0x30], esi
je 0x41044d
mov edi, 1
mov dword [esp + 0x10], edi
jmp 0x41045d
xor ecx, ecx
test edi, edi
setne cl
add ecx, 3
mov dword [esp + 0x10], ecx
mov edi, ecx
test ebx, ebx
mov eax, 0x80
mov ebx, dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov ecx, 0x4000102
cmove ecx, eax
mov dword [esp + 0x3c], ebx
mov eax, dword [0x48419c]
mov dword [esp + 0x24], ecx
test eax, eax
jne 0x4104aa
lea eax, [esp + 0x40]
mov dword [esp + 0x40], 0x114
push eax
call ebx
mov edx, dword [esp + 0x20]
xor eax, eax
cmp dword [esp + 0x50], 2
mov ecx, dword [esp + 0x24]
sete al
inc eax
mov dword [0x48419c], eax
cmp eax, 2
jne 0x41050f
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push ecx
push edi
push 0
push 3
push edx
push dword [esp + 0x34]
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x410567
cmp esi, dword [0x483254]
jge 0x410567
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x4104f0
cmp eax, 0x21
je 0x4104f0
cmp eax, 0x20
jne 0x410567
inc esi
mov eax, esi
imul eax, dword [0x483a34]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
jmp 0x4104b5
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push ecx
push edi
push 0
push 3
push edx
push dword [esp + 0x34]
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x410567
cmp esi, dword [0x483254]
jge 0x410567
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x410548
cmp eax, 0x21
je 0x410548
cmp eax, 0x20
jne 0x410567
inc esi
mov eax, esi
imul eax, dword [0x483a34]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
jmp 0x410515
test esi, esi
je 0x41058d
lea eax, [esi + 1]
imul eax, dword [0x483a34]
imul eax, esi
cdq
sub eax, edx
sar eax, 1
push eax
push str.delayed__dms_for_lock_sharing_conflict
push 0xa
call fcn.0040c910
add esp, 0xc
cmp edi, 0xffffffff
jne 0x41063f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [esp + 0x2c]
mov edx, str.winOpen
mov ecx, dword [esp + 0x18]
push 0x859c
push ecx
mov ecx, 0xe
mov dword [esi + 0x14], eax
call fcn.0040e9a0
push dword [esp + 0x24]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0xc
cmp dword [esp + 0x28], 0
je 0x41060c
cmp dword [esp + 0x30], 0
jne 0x41060c
push dword [esp + 0x34]
mov eax, dword [ebp + 0x14]
mov edx, dword [esp + 0x3c]
and eax, 0xfffffff9
or eax, 1
push eax
push esi
push dword [esp + 0x20]
push edx
call fcn.00410370
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x370]
xor ecx, esp
call fcn.00475bd4
mov esp, ebp
pop ebp
ret
push 0x4801ec
push 0x85a2
push str.cannot_open_file_at_line__d_of___.10s_
push 0xe
call fcn.0040c910
add esp, 0x10
mov eax, 0xe
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x370]
xor ecx, esp
call fcn.00475bd4
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x410653
xor eax, eax
cmp dword [esp + 0x28], eax
setne al
inc eax
mov dword [ecx], eax
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x38]
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0x18], 0
mov dword [eax + 0x24], 0
mov ecx, dword [esp + 0x14]
mov dword [eax + 0x20], ecx
mov ecx, dword [esp + 0x18]
mov dword [eax], 0x4793b8
mov dword [eax + 8], edi
mov dword [eax + 0x14], 0
mov dword [eax + 4], edx
mov dword [eax + 0x1c], 0
lea eax, [esp + 0x40]
push eax
push 0x104
push ecx
push edx
mov dword [esp + 0x24], 0x200
call fcn.00410b70
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0x10
test eax, eax
jne 0x41079b
lea ecx, [esp + 0x40]
call fcn.0040ff00
mov esi, eax
test esi, esi
je 0x410794
mov ecx, dword [0x48419c]
test ecx, ecx
jne 0x41070e
lea eax, [esp + 0x158]
mov dword [esp + 0x158], 0x114
push eax
call dword [esp + 0x40]
xor ecx, ecx
cmp dword [esp + 0x168], 2
sete cl
inc ecx
mov dword [0x48419c], ecx
cmp ecx, 2
mov ecx, esi
jne 0x410754
movzx eax, word [esi]
test ax, ax
je 0x41073b
mov edx, eax
nop
cmp dx, 0x5c
je 0x410736
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x410720
jmp 0x41073b
xor eax, eax
mov word [ecx], ax
lea eax, [esp + 0x10]
push eax
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
jmp 0x410788
mov al, byte [esi]
test al, al
je 0x410771
nop word [eax + eax]
cmp al, 0x5c
je 0x41076e
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x410760
jmp 0x410771
mov byte [ecx], 0
lea eax, [esp + 0x10]
push eax
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
push esi
mov edi, eax
call ebx
add esp, 4
test edi, edi
jne 0x41079b
mov eax, 0x200
jmp 0x41079f
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x2c]
push dword [esp + 0x1c]
mov dword [esi + 0x18], eax
call ebx
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x37c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00475bd4
mov esp, ebp
pop ebp
ret