Function at 0x4052c0
Capabilities:
Check os version

Disassembly:
sub esp, 0x120
push ebx
push ebp
mov ebp, dword [esp + 0x130]
push esi
test ebp, ebp
push edi
je 0x4052d9
mov byte [ebp], 0
mov esi, dword [esp + 0x13c]
test esi, esi
je 0x4052ea
mov dword [esi], 0
mov eax, dword [esp + 0x140]
test eax, eax
je 0x4052fb
mov dword [eax], 0
mov ecx, 0x25
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x20], 5
jb 0x405339
mov ecx, dword [esp + 0x134]
lea edx, [esp + 0xb0]
push ecx
push str..Global_s
push edx
jmp 0x40534e
mov eax, dword [esp + 0x134]
lea ecx, [esp + 0xb0]
push eax
push str.._s
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edx, [esp + 0xb0]
push 0
push 0x80
push 3
push 0
push 3
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
xor edi, edi
cmp ebx, edi
je 0x4054f1
cmp ebx, 0xffffffff
je 0x4054f1
lea eax, [esp + 0x18]
push edi
push eax
lea ecx, [esp + 0x18]
push 8
push ecx
push edi
push edi
push 1
push ebx
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x4053e5
cmp ebp, edi
je 0x4053d1
mov edi, str.InvalidResponse
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret
mov eax, dword [esp + 0x18]
cmp eax, 4
je 0x40542d
cmp eax, 8
je 0x40542d
cmp ebp, edi
je 0x405419
mov edi, str.InvalidResponse
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret
mov ecx, dword [esp + 0x134]
push str.WWHost
push ecx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
mov eax, dword [esp + 0x10]
jne 0x40548c
cmp eax, 0x137
je 0x4054cd
cmp ebp, edi
je 0x405478
mov edi, str.InvalidResponse
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret
cmp eax, 0x137
je 0x4054cd
cmp ebp, edi
je 0x4054b9
mov edi, str.InvalidResponse
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret
cmp esi, edi
je 0x4054d3
mov dword [esi], eax
mov eax, dword [esp + 0x140]
cmp eax, edi
je 0x4054e4
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x120
ret
cmp ebp, edi
je 0x405517
mov edi, str.OpenFailed
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret