Function at 0x412fc0
Capabilities:
Check os version

Disassembly:
sub esp, 0x9cc
mov eax, dword [0x5ed284]
xor eax, esp
mov dword [esp + 0x9c8], eax
push ebx
mov ebx, dword [esp + 0x9ec]
push ebp
mov ebp, dword [esp + 0x9dc]
push esi
push edi
mov edi, dword [esp + 0x9f0]
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], ebx
call fcn.004027a0
mov cl, byte [0x5efaf0]
test cl, 1
je 0x413014
test al, 1
je 0x413014
mov esi, 1
mov dword [esp + 0x14], esi
jmp 0x413031
test cl, 2
je 0x413563
test al, 2
je 0x413563
mov dword [esp + 0x14], 2
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x154]
push eax
mov dword [esp + 0x158], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x164], 2
je 0x413089
cmp esi, 2
jne 0x4130a3
mov ecx, dword [esp + 0x9f4]
mov edx, dword [esp + 0x9ec]
mov eax, dword [esp + 0x9e8]
push ebx
push ecx
mov ecx, dword [esp + 0x9e8]
push edi
push edx
push eax
push ebp
push ecx
call fcn.00412ae0
add esp, 0x1c
jmp 0x413568
cmp esi, 2
jne 0x4130a3
push 0x3e8
push esi
push 6
call fcn.00403050
mov edi, eax
mov dword [esp + 0x1c], edi
jmp 0x4130b4
push 0x11
push 2
push 2
call fcn.00403050
mov dword [esp + 0x1c], eax
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
jne 0x4130c6
mov eax, 0x3f
jmp 0x413568
push 4
lea edx, [esp + 0x20]
push edx
push 0x20
push 0xffff
push edi
mov dword [0x5efb6c], edi
mov dword [esp + 0x30], 1
call fcn.004030c0
mov eax, dword [0x813b30]
push eax
call fcn.00414910
add esp, 0x18
test eax, eax
jne 0x413144
mov ecx, dword [0x813b30]
push ecx
call fcn.00414920
xor ebx, ebx
add esp, 4
cmp eax, ebx
jne 0x41311f
push edi
call sub.WS2_32.dll_closesocket
mov eax, 0x4a
jmp 0x413568
movzx eax, word [eax]
cmp ax, 6
jne 0x41312d
cmp esi, 2
je 0x413146
cmp ax, 2
jne 0x413138
cmp esi, 1
je 0x413146
mov dword [0x5efb68], 1
jmp 0x413152
xor ebx, ebx
cmp dword [0x5efb68], ebx
je 0x413277
mov edi, 0x813b30
push edi
call fcn.00414940
add esp, 4
cmp esi, 2
jne 0x4131cb
push 0xe
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov esi, eax
add esp, 4
cmp esi, ebx
jne 0x413198
mov ecx, dword [0x5efb6c]
push ebx
call fcn.00412430
mov edx, dword [esp + 0x14]
add esp, 4
push edx
call sub.WS2_32.dll_closesocket
mov eax, 0x40
jmp 0x413568
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov word [esi + 0xc], ax
mov word [esi], 6
movzx eax, word [0x5efb60]
push eax
call fcn.00403180
mov word [esi + 0xc], ax
or eax, 0xffffffff
mov dword [esi + 2], ebx
mov dword [esi + 6], eax
mov word [esi + 0xa], ax
jmp 0x413228
push 0x10
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov esi, eax
add esp, 4
cmp esi, ebx
jne 0x4131fe
mov ecx, dword [0x5efb6c]
push ebx
call fcn.00412430
mov ecx, dword [esp + 0x14]
add esp, 4
push ecx
call sub.WS2_32.dll_closesocket
mov eax, 0x40
jmp 0x413568
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov word [esi], 2
movzx edx, word [0x5efb60]
push edx
call fcn.00403180
mov word [esi + 2], ax
mov dword [esi + 4], 0xffffffff
push esi
push edi
call fcn.00414950
mov eax, dword [0x813b30]
add esp, 0xc
push eax
mov dword [0x814330], edi
call fcn.00414910
add esp, 4
test eax, eax
je 0x41326d
mov ecx, dword [0x5efb6c]
push ebx
call fcn.00412430
mov ecx, dword [esp + 0x14]
add esp, 4
push ecx
call sub.WS2_32.dll_closesocket
mov eax, 0x41
jmp 0x413568
mov edi, dword [esp + 0x10]
mov dword [0x5efb68], ebx
push ebx
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
add esp, 4
cmp edx, ebx
jg 0x413292
jl 0x41310f
cmp eax, ebx
jb 0x41310f
push ebx
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
add esp, 4
push ebx
push 0x2000
push edx
push eax
call fcn.0055a160
push 0x3e8
lea edx, [esp + 0x1fc]
push ebx
push edx
mov dword [esp + 0x1f8], eax
mov dword [esp + 0x200], 0xffffffff
mov dword [esp + 0x1f4], 0x2c6
mov dword [esp + 0x1fc], ebx
call sub.VCRUNTIME140.dll_memset
mov eax, ebp
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4132e7
sub eax, edx
add eax, 1
cmp eax, 0x3e8
ja 0x41330e
push eax
lea eax, [esp + 0x1fc]
push ebp
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov esi, dword [0x813b30]
push esi
call fcn.00414910
add esp, 4
test eax, eax
jne 0x413367
push esi
call fcn.00414920
mov edx, dword [0x5efb6c]
push 0x10
push eax
push ebx
push 0x1a0
lea ecx, [esp + 0x1fc]
push ecx
push edx
call fcn.00403100
add esp, 0x1c
cmp eax, 0x1a0
jne 0x413418
push esi
call fcn.00414930
mov esi, eax
push esi
call fcn.00414910
add esp, 8
test eax, eax
je 0x413321
push ebx
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
mov edi, dword [esp + 0x9f8]
mov esi, dword [esp + 0x9f0]
mov ebp, eax
add esp, 4
add ebp, dword [esp + 0x9e8]
mov dword [esp + 0x1c], ebp
jmp 0x413390
push ebx
mov dword [esp + 0x2c], ebx
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
mov ecx, ebp
add esp, 4
sub ecx, eax
mov dword [esp + 0x24], ecx
jns 0x4133ab
mov dword [esp + 0x24], ebx
mov eax, dword [0x5efb6c]
lea edx, [esp + 0x24]
push edx
push ebx
push ebx
lea ecx, [esp + 0x3c]
mov dword [esp + 0x40], eax
push ecx
add eax, 1
push eax
mov dword [esp + 0x44], 1
call fcn.00403080
add esp, 0x14
cmp eax, 0xffffffff
je 0x4134f1
cmp eax, ebx
je 0x413546
cmp dword [esp + 0x14], 2
jne 0x41342c
lea edx, [esp + 0x18]
push edx
mov edx, dword [0x5efb6c]
lea eax, [esp + 0x138]
push eax
push ebx
push 0x3f8
lea ecx, [esp + 0x5f0]
push ecx
mov dword [esp + 0x2c], 0xe
push edx
jmp 0x413455
mov eax, dword [esp + 0x10]
push eax
call sub.WS2_32.dll_closesocket
mov eax, 0x3e
jmp 0x413568
lea eax, [esp + 0x18]
push eax
mov eax, dword [0x5efb6c]
lea ecx, [esp + 0x148]
push ecx
push ebx
push 0x3f8
lea edx, [esp + 0x5f0]
push edx
mov dword [esp + 0x2c], 0x10
push eax
call fcn.00403140
add esp, 0x18
cmp eax, 0xffffffff
je 0x413390
mov ecx, dword [esp + 0x5e4]
cmp ecx, dword [esp + 0x1ec]
jne 0x413390
mov edx, dword [esp + 0x5ec]
cmp edx, dword [esp + 0x1f4]
jne 0x413390
cmp dword [esp + 0x14], 2
jne 0x4134a4
lea eax, [esp + 0x134]
push eax
call fcn.004029a0
jmp 0x4134b1
mov ecx, dword [esp + 0x148]
push ecx
call fcn.00403030
mov ebp, dword [esp + 0x30]
mov ebx, dword [esp + 0x24]
add esp, 4
push edi
push esi
push eax
lea edx, [esp + 0x5fc]
push edx
mov ecx, ebp
call fcn.00412120
add esp, 0x10
cmp esi, 4
jne 0x4134dd
cmp word [ebp + 0x40], 0
ja 0x413544
cmp eax, 0x40
je 0x413533
test eax, eax
je 0x413544
mov ebp, dword [esp + 0x1c]
xor ebx, ebx
jmp 0x413390
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x413390
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x41351c
mov ecx, dword [0x5efb6c]
push ebx
call fcn.00412430
add esp, 4
mov ecx, dword [esp + 0x10]
push ecx
call sub.WS2_32.dll_closesocket
mov edx, dword [esp + 0x20]
xor eax, eax
cmp dword [edx], ebx
setle al
jmp 0x413568
mov eax, dword [esp + 0x10]
push eax
call sub.WS2_32.dll_closesocket
mov eax, 0x40
jmp 0x413568
xor ebx, ebx
mov ecx, dword [0x5efb6c]
push ebx
call fcn.00412430
mov eax, dword [esp + 0x14]
add esp, 4
push eax
call sub.WS2_32.dll_closesocket
xor eax, eax
jmp 0x413568
mov eax, 0x4c
mov ecx, dword [esp + 0x9d8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0052bfb9
add esp, 0x9cc
ret