Function at 0x4124b0
Capabilities:
Check http status code
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57f1d0
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x5e6000]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1c], ecx
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x20]
xor ebx, ebx
mov dword [ebp - 0x14], ebx
lea edx, [edi + 4]
call fcn.0040f3f0
mov ecx, dword [eax]
call fcn.0040f0a0
mov edx, dword [ebp - 0x20]
or esi, 0xffffffff
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412512
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 4], ebx
je 0x4125c0
push dword [eax + 0x48]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, eax
mov eax, dword [edi + 4]
test ecx, ecx
jg 0x412549
add eax, 0xfffffff0
push eax
call fcn.00402880
add esp, 4
mov ebx, 8
add eax, 0x10
mov dword [ebp - 0x20], eax
jmp 0x412561
mov eax, dword [eax - 0xc]
sub eax, ecx
push eax
push ecx
lea eax, [ebp - 0x20]
push eax
lea ecx, [edi + 4]
call fcn.00413ae0
mov ebx, 0x18
lea eax, [ebp - 0x20]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x30]
or ebx, 1
push 0x5c7014
push eax
mov dword [ebp - 0x14], ebx
call fcn.00407120
push str._...
push eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 4], 1
or ebx, 2
push eax
mov dword [ebp - 0x14], ebx
call fcn.004072b0
push dword [eax]
mov eax, dword [ebp - 0x1c]
or ebx, 4
mov dword [ebp - 4], 2
mov dword [ebp - 0x14], ebx
mov eax, dword [eax + 4]
mov eax, dword [eax]
call eax
add esp, 0x1c
mov byte [ebp - 0xd], 1
test eax, eax
je 0x4125c4
mov byte [ebp - 0xd], 0
mov dword [ebp - 4], 1
test bl, 4
je 0x4125f0
mov edx, dword [ebp - 0x2c]
and ebx, 0xfffffffb
mov dword [ebp - 0x14], ebx
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4125f0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0
test bl, 2
je 0x41261c
mov edx, dword [ebp - 0x30]
and ebx, 0xfffffffd
mov dword [ebp - 0x14], ebx
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41261c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
test bl, 1
je 0x412640
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x412640
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
jne 0x412850
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 4]
test eax, eax
je 0x412668
mov eax, dword [eax + 4]
push 0
push 0
call eax
add esp, 8
test eax, eax
je 0x412850
push 0
push 0
push 0
push 1
push 0
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
test ebx, ebx
jne 0x41268e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x5ef70c], eax
jmp 0x412850
push 0
push 0x84400100
push 0
push 0
push dword [edi + 8]
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
test esi, esi
jne 0x4126c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov dword [0x5ef70c], eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x412850
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x24], 0
push eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x18], 4
push eax
push 0x20000013
push esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4126f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x5ef70c], eax
jmp 0x412844
mov eax, dword [ebp - 0x24]
cmp eax, 0xc8
je 0x412710
cmp eax, 0xce
je 0x412710
cmp eax, 0x12e
jne 0x4126e8
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4126e8
xor ecx, ecx
push 0x10000
push ecx
push 0x5f5230
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x28], ecx
call fcn.00560490
add esp, 0xc
add edi, 0x10
lea eax, [ebp - 0x18]
push eax
push 0x10000
push 0x5f5230
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x412830
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4127c2
mov edi, dword [ebp - 0x14]
lea ecx, [ebp - 0x28]
push 0
push ecx
push eax
push 0x5f5230
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x18]
cmp ecx, eax
jne 0x412808
mov edx, dword [ebp - 0x20]
mov edi, dword [ebp + 8]
add edx, ecx
mov ecx, dword [ebp - 0x1c]
add edi, 0x10
mov dword [ebp - 0x20], edx
mov ecx, dword [ecx + 4]
test ecx, ecx
je 0x4127be
push dword [edi]
mov eax, dword [ecx + 4]
push edx
call eax
add esp, 8
test eax, eax
je 0x412830
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x412750
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
mov edx, dword [edi]
xor eax, eax
test edx, edx
je 0x412811
cmp eax, dword [ebp - 0x20]
mov ecx, dword [ebp + 8]
sbb eax, eax
neg eax
mov dword [ecx], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
jmp 0x412839
cmp dword [ebp - 0x20], edx
mov ecx, dword [ebp + 8]
sete al
mov dword [ecx], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x14]
mov dword [0x5ef70c], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4