Function at 0x405210
Capabilities:
Check internet connectivity via wininet
Connect to http server
Create http request
Create thread
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x464aab
mov eax, dword fs:[0]
push eax
mov eax, 0x2514
call fcn.00440940
mov eax, dword [0x49806c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, ecx
mov dword [ebp - 0x24ac], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x20]
mov edi, dword [ebp + 0x18]
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 0x24b0], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x24dc], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x24f8], ecx
xor ecx, ecx
mov dword [ebp - 0x2498], ecx
mov dword [ebp - 0x24d8], eax
mov eax, dword [ebp + 0x14]
mov dword [edx + 0x1c], eax
mov dword [ebp - 0x24d0], eax
mov eax, dword [ebp - 0x24d8]
push 0xffffffffffffffff
mov dword [edx + 0x10], ecx
mov dword [edx + 0x24], esi
mov dword [edx + 0x20], eax
mov byte [edx + 0x18], 1
push dword [edi]
mov dword [ebp - 0x24d4], edi
mov dword [ebp - 0x24bc], ecx
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
cmp dword [esi], 0
jne 0x405c1b
lea eax, [ebp - 0x2498]
mov dword [ebp - 0x2498], 8
push eax
lea eax, [ebp - 0x24cc]
push eax
push 0x32
push 0
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
test eax, eax
je 0x405e9b
mov eax, dword [ebp - 0x24cc]
and eax, 1
je 0x405e9b
push 0xffffffffffffffff
push dword [edi]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
cmp dword [esi], 0
jne 0x405c1b
push 0
lea eax, [ebp - 0x2498]
mov dword [ebp - 0x2498], 0
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
je 0x405e94
test byte [ebp - 0x2498], 0x20
jne 0x405e94
push 0xffffffffffffffff
push dword [edi]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
cmp dword [esi], 0
jne 0x405c1b
push ecx
mov edx, 0x477904
lea ecx, [ebp - 0x24a0]
call fcn.0040fa80
add esp, 4
mov eax, dword [ebp - 0x24ac]
add eax, 4
mov dword [ebp - 4], 0
mov dword [ebp - 0x24c8], eax
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
je 0x405400
push ecx
mov edx, str.GAcbHA
lea ecx, [ebp - 0x2498]
call fcn.0040fa80
add esp, 4
push eax
lea ecx, [ebp - 0x24a0]
mov byte [ebp - 4], 1
call fcn.00406a60
lea ecx, [ebp - 0x2498]
mov byte [ebp - 4], 0
call fcn.00406490
push ecx
mov edx, str.PC0wPGcwJSQ
lea ecx, [ebp - 0x24b8]
call fcn.0040fa80
mov esi, eax
mov edx, str.KycmPC0mPGU8MTgt
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2498]
call fcn.0040fa80
add esp, 4
mov ecx, dword [ebp - 0x24ac]
push esi
push eax
mov byte [ebp - 4], 3
call fcn.00404a10
lea ecx, [ebp - 0x2498]
call fcn.00406490
lea ecx, [ebp - 0x24b8]
call fcn.00406490
lea ecx, [ebp - 0x249c]
call fcn.00406ba0
push ecx
mov edx, str.KjE8LTt1bSxlbSw
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2498]
call fcn.0040fa80
mov ecx, dword [ebp - 0x24d8]
mov byte [ebp - 4], 5
push dword [ecx]
mov ecx, dword [ebp - 0x24d0]
push dword [ecx]
push dword [eax]
lea eax, [ebp - 0x249c]
push eax
call fcn.00408660
add esp, 0x14
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2498]
call fcn.00406490
push ecx
mov edx, 0x477988
lea ecx, [ebp - 0x2498]
call fcn.0040fa80
add esp, 4
lea ecx, [ebp - 0x249c]
mov byte [ebp - 4], 6
push ecx
mov ecx, dword [ebp - 0x24ac]
push eax
call fcn.00404a10
lea ecx, [ebp - 0x2498]
mov byte [ebp - 4], 4
mov esi, eax
call fcn.00406490
cmp esi, 2
jne 0x405511
push ecx
mov edx, 0x47799c
lea ecx, [ebp - 0x2498]
call fcn.0040fa80
mov esi, dword [ebp - 0x24ac]
add esp, 4
push eax
lea eax, [ebp - 0x24c4]
push eax
lea ecx, [esi + 0x30]
call fcn.00406290
lea ecx, [esi + 0x30]
push dword [eax]
lea eax, [ebp - 0x24e0]
push eax
call fcn.00407cf0
lea ecx, [ebp - 0x2498]
call fcn.00406490
push ecx
mov edx, str.GikmLy0
lea ecx, [ebp - 0x2498]
call fcn.0040fa80
add esp, 4
lea ecx, [ebp - 0x249c]
mov byte [ebp - 4], 7
push ecx
push eax
mov ecx, esi
call fcn.00404a10
lea ecx, [ebp - 0x2498]
mov byte [ebp - 4], 4
call fcn.00406490
mov eax, dword [ebp - 0x24ac]
add eax, 0x30
push eax
lea eax, [ebp - 0x24a4]
push eax
call fcn.00404300
push 0xffffffffffffffff
mov byte [ebp - 4], 8
push dword [edi]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov esi, dword [ebp + 0x1c]
cmp dword [esi], 0
jne 0x405bfa
mov ecx, dword [ebp - 0x24ac]
push 0
push 0
push 0
push 0
push dword [ecx + 0x44]
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ecx, dword [ebp - 0x24ac]
push eax
lea ecx, [ecx + 0xc]
call fcn.00405ee0
mov ecx, dword [ebp - 0x24ac]
cmp dword [ecx + 0xc], 0
jne 0x40559e
lea ecx, [ebp - 0x24a4]
call fcn.00406490
lea ecx, [ebp - 0x249c]
call fcn.00406490
lea ecx, [ebp - 0x24a0]
call fcn.00406490
mov eax, 6
jmp 0x405ea0
lea ecx, [ebp - 0x2494]
call fcn.004020d0
push 4
push dword [0x48c948]
mov eax, 0x50
mov dword [ebp - 0x44], 2
mov word [ebp - 0x48], ax
mov eax, ecx
push 0x21
push eax
mov dword [ebp - 0x40], 4
call fcn.00448e48
push eax
call fcn.004012e0
add esp, 0x14
lea ecx, [ebp - 0x2494]
call fcn.004020d0
mov eax, dword [ebp - 0x24b0]
push dword [eax]
call fcn.00401880
test eax, eax
jne 0x405622
lea ecx, [ebp - 0x24a4]
call fcn.00406490
lea ecx, [ebp - 0x249c]
call fcn.00406490
lea ecx, [ebp - 0x24a0]
call fcn.00406490
mov eax, 8
jmp 0x405ea0
push 0xffffffffffffffff
push dword [edi]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
cmp dword [esi], 0
jne 0x405bfa
mov ecx, dword [ebp - 0x24ac]
lea eax, [ebp - 0x2452]
push 0
push 0
push 3
push 0x4779c4
push 0x4779c8
push dword [ebp - 0x48]
push eax
push dword [ecx + 0xc]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov esi, eax
mov dword [ebp - 0x24b0], esi
mov byte [ebp - 4], 9
test esi, esi
jne 0x4056a2
lea ecx, [ebp - 0x24b0]
call fcn.00405ec0
lea ecx, [ebp - 0x24a4]
call fcn.00406490
lea ecx, [ebp - 0x249c]
call fcn.00406490
lea ecx, [ebp - 0x24a0]
call fcn.00406490
lea eax, [esi + 7]
jmp 0x405ea0
mov ecx, 0x1bb
mov eax, 0x84c03300
cmp word [ebp - 0x48], cx
mov edi, 0x84403300
lea ecx, [ebp - 0x24b4]
cmove edi, eax
lea eax, [ebp - 0x204c]
push eax
call fcn.00406ad0
lea eax, [ebp - 0x104a]
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp - 0x24b4]
call fcn.004069c0
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x405be4
mov eax, dword [ebp - 0x24ac]
cmp dword [eax + 0x4c], 0
je 0x405739
push ecx
mov edx, str.ABwcGGd5Znk
lea ecx, [ebp - 0x24e0]
call fcn.0040fa80
add esp, 4
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x28]
push dword [eax]
mov dword [ebp - 0x2498], 1
call fcn.004062f0
mov ecx, 3
mov dword [ebp - 0x24bc], ecx
cmp dword [eax + 0x14], 8
jb 0x40573b
mov eax, dword [eax]
jmp 0x40573b
xor eax, eax
push 0
push edi
push 0
push 0
push eax
push dword [ebp - 0x24b4]
push dword [ebp - 0x24a0]
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
mov dword [ebp - 0x24b8], edi
mov dword [ebp - 4], 0xc
mov eax, dword [ebp - 0x24bc]
test al, 2
je 0x405786
and eax, 0xfffffffd
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x24bc], eax
call fcn.00407030
mov eax, dword [ebp - 0x24bc]
mov byte [ebp - 4], 0xd
test al, 1
je 0x4057a2
and eax, 0xfffffffe
lea ecx, [ebp - 0x24e0]
mov dword [ebp - 0x24bc], eax
call fcn.00406490
test edi, edi
jne 0x4057f0
lea ecx, [ebp - 0x24b8]
call fcn.00405ec0
lea ecx, [ebp - 0x24b4]
call fcn.00406490
lea ecx, [ebp - 0x24b0]
call fcn.00405ec0
lea ecx, [ebp - 0x24a4]
call fcn.00406490
lea ecx, [ebp - 0x249c]
call fcn.00406490
lea ecx, [ebp - 0x24a0]
call fcn.00406490
lea eax, [edi + 9]
jmp 0x405ea0
mov esi, dword [ebp - 0x24d4]
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x405bd9
lea eax, [ebp - 0x24c4]
mov dword [ebp - 0x24c4], 4
push eax
lea eax, [ebp - 0x2498]
push eax
push 0x1f
push edi
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
or dword [ebp - 0x2498], 0x100
lea eax, [ebp - 0x2498]
push 4
push eax
push 0x1f
push edi
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push ecx
mov edx, str.Dw0c
lea ecx, [ebp - 0x24c4]
call fcn.0040fa80
add esp, 4
lea ecx, [ebp - 0x24a0]
mov edx, eax
call fcn.00406600
lea ecx, [ebp - 0x24c4]
mov byte [ebp - 0x24a5], al
call fcn.00406490
cmp byte [ebp - 0x24a5], 0
je 0x40589b
mov eax, dword [ebp - 0x24a4]
push 0
push 0
push dword [eax - 0xc]
push eax
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
jmp 0x405906
mov edx, dword [ebp - 0x24c8]
lea ecx, [ebp - 0x2498]
call fcn.00412160
lea eax, [ebp - 0x2498]
mov byte [ebp - 4], 0xe
push eax
lea ecx, [ebp - 0x24ec]
call fcn.00406c50
mov ecx, dword [ebp - 0x2498]
mov edx, dword [eax + 4]
push dword [ecx - 0xc]
mov eax, dword [ebp - 0x24a4]
push edx
push dword [eax - 0xc]
push eax
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
lea ecx, [ebp - 0x24ec]
mov dword [ebp - 0x24c8], eax
call fcn.00406bd0
lea ecx, [ebp - 0x2498]
mov byte [ebp - 4], 0xd
call fcn.00406490
mov eax, dword [ebp - 0x24c8]
test eax, eax
jne 0x405956
lea ecx, [ebp - 0x24b8]
call fcn.00405ec0
lea ecx, [ebp - 0x24b4]
call fcn.00406490
lea ecx, [ebp - 0x24b0]
call fcn.00405ec0
lea ecx, [ebp - 0x24a4]
call fcn.00406490
lea ecx, [ebp - 0x249c]
call fcn.00406490
lea ecx, [ebp - 0x24a0]
call fcn.00406490
mov eax, 0xa
jmp 0x405ea0
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x405bd9
lea eax, [ebp - 0x24c8]
mov dword [ebp - 0x24c8], edi
push eax
lea eax, [ebp - 0x24c0]
push eax
call fcn.00403df0
lea eax, [ebp - 0x24c8]
mov byte [ebp - 4], 0xf
push eax
lea eax, [ebp - 0x24c4]
mov dword [ebp - 0x24c8], edi
push eax
call fcn.00403c00
mov ecx, dword [ebp - 0x24ac]
add ecx, 8
mov byte [ebp - 4], 0x10
push eax
call fcn.00406a60
lea ecx, [ebp - 0x24c4]
mov byte [ebp - 4], 0xf
call fcn.00406490
push ecx
mov edx, str.enh
lea ecx, [ebp - 0x24c4]
call fcn.0040fa80
add esp, 4
mov byte [ebp - 4], 0x11
mov ecx, dword [ebp - 0x24bc]
push dword [eax]
or ecx, 4
mov dword [ebp - 0x24bc], ecx
mov dword [ebp - 0x2498], ecx
mov ecx, dword [ebp - 0x24ac]
add ecx, 8
call fcn.00406990
test eax, eax
je 0x405a50
push ecx
mov edx, str.enh4
lea ecx, [ebp - 0x24c8]
call fcn.0040fa80
add esp, 4
mov dword [ebp - 4], 0x12
mov ecx, dword [ebp - 0x24bc]
push dword [eax]
or ecx, 8
mov dword [ebp - 0x24bc], ecx
mov dword [ebp - 0x2498], ecx
mov ecx, dword [ebp - 0x24ac]
lea ecx, [ecx + 8]
call fcn.00406990
mov byte [ebp - 0x24a5], 1
test eax, eax
jne 0x405a57
mov byte [ebp - 0x24a5], 0
mov ecx, dword [ebp - 0x24bc]
test cl, 8
je 0x405a6d
lea ecx, [ebp - 0x24c8]
call fcn.00406490
lea ecx, [ebp - 0x24c4]
mov dword [ebp - 4], 0xf
call fcn.00406490
cmp byte [ebp - 0x24a5], 0
je 0x405adf
lea ecx, [ebp - 0x24c0]
call fcn.00406490
lea ecx, [ebp - 0x24b8]
call fcn.00405ec0
lea ecx, [ebp - 0x24b4]
call fcn.00406490
lea ecx, [ebp - 0x24b0]
call fcn.00405ec0
lea ecx, [ebp - 0x24a4]
call fcn.00406490
lea ecx, [ebp - 0x249c]
call fcn.00406490
lea ecx, [ebp - 0x24a0]
call fcn.00406490
mov eax, 0xb
jmp 0x405ea0
mov eax, dword [ebp - 0x24ac]
push 0
push 0
push eax
push 0x405180
push 0
mov dword [eax + 0x10], edi
push 0
mov dword [eax + 0x14], 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov ecx, dword [ebp - 0x24ac]
mov dword [ecx + 0x14], eax
lea eax, [ecx + 0x28]
push eax
lea eax, [ebp - 0x24c0]
push eax
call fcn.00403ee0
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x405bce
push ecx
mov edx, 0x477a0c
lea ecx, [ebp - 0x24c8]
call fcn.0040fa80
mov ecx, dword [ebp - 0x24ac]
add esp, 4
push eax
lea eax, [ebp - 0x24c4]
push eax
lea ecx, [ecx + 0x28]
call fcn.00406290
lea ecx, [ebp - 0x24c8]
call fcn.00406490
push 0x20000
call fcn.0043fed1
add esp, 4
mov dword [ebp - 0x24fc], 0
mov esi, eax
mov dword [ebp - 0x2520], 0x28
mov eax, dword [ebp - 0x24d4]
xorps xmm0, xmm0
movups xmmword [ebp - 0x250c], xmm0
push 0xffffffffffffffff
movups xmmword [ebp - 0x251c], xmm0
mov dword [ebp - 0x2508], 0x20000
push dword [eax]
mov dword [ebp - 0x250c], esi
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
je 0x405c25
push 1
push esi
call fcn.0043ff54
add esp, 8
lea ecx, [ebp - 0x24c0]
call fcn.00406490
lea ecx, [ebp - 0x24b8]
call fcn.00405ec0
lea ecx, [ebp - 0x24b4]
call fcn.00406490
lea ecx, [ebp - 0x24b0]
call fcn.00405ec0
lea ecx, [ebp - 0x24a4]
call fcn.00406490
lea ecx, [ebp - 0x249c]
call fcn.00406490
lea ecx, [ebp - 0x24a0]
call fcn.00406490
mov eax, 0xf
jmp 0x405ea0
mov eax, dword [ebp - 0x24d4]
push 0xffffffffffffffff
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x405bc3
push 0
push 4
lea eax, [ebp - 0x2520]
push eax
push edi
call dword [sym.imp.WININET.dll_InternetReadFileExW]
mov edx, dword [ebp - 0x24ac]
mov ecx, dword [ebp - 0x2508]
mov dword [ebp - 0x2498], ecx
mov dword [edx + 0x10], 0
test eax, eax
je 0x405e35
test ecx, ecx
je 0x405d55
mov eax, dword [ebp - 0x24d8]
mov ecx, dword [ebp - 0x24d0]
mov eax, dword [eax]
sub eax, dword [ecx]
mov dword [ebp - 0x24c8], eax
nop
mov eax, dword [ebp - 0x24d4]
push 0xffffffffffffffff
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x405bc3
mov eax, dword [ebp - 0x24d0]
xorps xmm0, xmm0
mov ecx, dword [ebp - 0x2498]
mov edx, dword [ebp - 0x24c8]
mov dword [ebp - 0x24f4], 0
mov eax, dword [eax]
mov dword [ebp - 0x24ec], eax
lea eax, [ebp - 0x24f4]
mov dword [ebp - 0x24f0], 0
movq qword [ebp - 0x24e8], xmm0
push eax
mov eax, dword [ebp - 0x24dc]
push 0
cmp edx, ecx
jae 0x405cfb
push edx
jmp 0x405cfc
push ecx
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x405d45
call fcn.004014a0
cmp eax, 0x80070070
jne 0x405d3d
mov eax, dword [ebp - 0x24d4]
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_ResetEvent]
push 0
push 0
push 0x464
push dword [ebp - 0x24f8]
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x405c90
test eax, eax
js 0x405dd6
mov eax, dword [ebp - 0x24d0]
mov ecx, dword [ebp - 0x2498]
add dword [eax], ecx
jmp 0x405d5b
mov eax, dword [ebp - 0x24d0]
mov edx, dword [ebp - 0x24d8]
mov eax, dword [eax]
cmp eax, dword [edx]
jae 0x405d77
test ecx, ecx
je 0x405d77
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
je 0x405c25
push 1
push esi
call fcn.0043ff54
add esp, 8
lea ecx, [ebp - 0x24c0]
call fcn.00406490
lea ecx, [ebp - 0x24b8]
call fcn.00405ec0
lea ecx, [ebp - 0x24b4]
call fcn.00406490
lea ecx, [ebp - 0x24b0]
call fcn.00405ec0
lea ecx, [ebp - 0x24a4]
call fcn.00406490
lea ecx, [ebp - 0x249c]
call fcn.00406490
lea ecx, [ebp - 0x24a0]
call fcn.00406490
xor eax, eax
jmp 0x405ea0
push 1
push esi
call fcn.0043ff54
add esp, 8
lea ecx, [ebp - 0x24c0]
call fcn.00406490
lea ecx, [ebp - 0x24b8]
call fcn.00405ec0
lea ecx, [ebp - 0x24b4]
call fcn.00406490
lea ecx, [ebp - 0x24b0]
call fcn.00405ec0
lea ecx, [ebp - 0x24a4]
call fcn.00406490
lea ecx, [ebp - 0x249c]
call fcn.00406490
lea ecx, [ebp - 0x24a0]
call fcn.00406490
mov eax, 0xe
jmp 0x405ea0
push 1
push esi
call fcn.0043ff54
add esp, 8
lea ecx, [ebp - 0x24c0]
call fcn.00406490
lea ecx, [ebp - 0x24b8]
call fcn.00405ec0
lea ecx, [ebp - 0x24b4]
call fcn.00406490
lea ecx, [ebp - 0x24b0]
call fcn.00405ec0
lea ecx, [ebp - 0x24a4]
call fcn.00406490
lea ecx, [ebp - 0x249c]
call fcn.00406490
lea ecx, [ebp - 0x24a0]
call fcn.00406490
mov eax, 0xc
jmp 0x405ea0
mov eax, 5
jmp 0x405ea0
mov eax, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043f6c1
mov esp, ebp
pop ebp
ret 0x1c