Function at 0x43bd10
Capabilities:
Connect to http server
Create http request
Download and write a file
Get http content length
Print debug messages
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 0x52ecd0
mov eax, dword fs:[0]
push eax
sub esp, 0x44
push ebx
push esi
push edi
mov eax, dword [0x56d380]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp + 0x14]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x43bd44
sub eax, edx
sar eax, 1
je 0x43c269
mov eax, dword [ebp + 0x18]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x43bd60
sub eax, edx
sar eax, 1
je 0x43c269
mov ecx, 0x56c260
mov eax, dword [0x56c260]
mov edx, dword [eax + 0xc]
call edx
add eax, 0x10
mov dword [ebp - 0x14], eax
xor edi, edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x3c], edi
xor ebx, ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x34], 4
mov dword [ebp - 0x30], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 4], edi
push edi
push edi
push edi
push 1
push str.QFYYLNCH
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x24], eax
cmp eax, edi
jne 0x43be01
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._n__C11WiniNet_InternetOpen_Error:__d
lea eax, [ebp - 0x14]
push eax
call fcn.00428a30
add esp, 0xc
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 4], 0xffffffff
jmp 0x43c1f1
mov dword [ebp - 0x1c], 0x2710
push 4
lea edx, [ebp - 0x1c]
push edx
push 2
push eax
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
call esi
mov dword [ebp - 0x1c], 0x3a98
push 4
lea eax, [ebp - 0x1c]
push eax
push 6
mov ecx, dword [ebp - 0x24]
push ecx
call esi
mov dword [ebp - 0x1c], 0x3a98
push 4
lea edx, [ebp - 0x1c]
push edx
push 8
mov eax, dword [ebp - 0x24]
push eax
call esi
mov dword [ebp - 0x1c], 0x2710
push 4
lea ecx, [ebp - 0x1c]
push ecx
push 7
mov edx, dword [ebp - 0x24]
push edx
call esi
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x18]
call fcn.0043bb50
test eax, eax
je 0x43be74
mov dword [ebp - 4], 0xffffffff
jmp 0x43c1f1
push 0
push 0
push 3
push 0
push 0
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov esi, eax
mov dword [ebp - 0x44], esi
test esi, esi
jne 0x43bec7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._n__C11WiniNet_InternetConnect_Error:__d
lea ecx, [ebp - 0x14]
push ecx
call fcn.00428a30
add esp, 0xc
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 4], 0xffffffff
jmp 0x43c1f1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x18]
call fcn.0043bb50
test eax, eax
je 0x43bee9
mov dword [ebp - 4], 0xffffffff
jmp 0x43c1f1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0
push 0x84000002
push 0
push 0x53cbd0
push str.HTTP_1.1
mov ecx, dword [ebp + 0x14]
push ecx
push 0x53f460
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [ebp - 0x28], esi
mov dword [ebp + 0x14], 0
lea edx, [ebp + 0x14]
push edx
push 3
push esi
mov ecx, dword [ebp - 0x18]
call fcn.0043bc10
test eax, eax
jne 0x43bf3d
mov dword [ebp - 4], 0xffffffff
jmp 0x43c1f1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x34], 4
push 0
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x20]
push ecx
push 0x20000005
push esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x43bf8f
cmp dword [ebp - 0x20], 0x3e800000
jbe 0x43bfc6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x20]
push edx
push eax
push str._n__C11WiniNet_HttpQueryInfo__d__dwContentLen
lea eax, [ebp - 0x14]
push eax
call fcn.00428a30
add esp, 0x10
jmp 0x43bdeb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str._n__C11WiniNet_HttpQueryInfo_Error:__d
lea edx, [ebp - 0x14]
push edx
call fcn.00428a30
add esp, 0xc
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp esi, 0x2f76
jne 0x43bdf5
mov dword [ebp - 0x20], 0x3e800000
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
mov ecx, dword [ebp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x3c], edi
or esi, 0xffffffff
cmp edi, esi
jne 0x43c01e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._n__C11WiniNet_CreateFile_Error:__d
lea edx, [ebp - 0x14]
push edx
call fcn.00428a30
add esp, 0xc
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 4], esi
jmp 0x43c205
push 0x400
call fcn.0047c0b3
add esp, 4
mov ebx, eax
mov dword [ebp - 0x40], ebx
test eax, eax
jne 0x43c042
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], esi
jmp 0x43c1ec
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x18]
call fcn.0043bb50
test eax, eax
je 0x43c05a
mov dword [ebp - 4], esi
jmp 0x43c1ec
mov dword [ebp - 0x38], 0
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x48], esi
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x2c], 0
push 0x400
push 0
push ebx
call fcn.00500080
add esp, 0xc
lea edx, [ebp - 0x2c]
push edx
push 0x400
push ebx
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x43c1ae
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x43c13e
add dword [ebp - 0x38], eax
sub esi, eax
mov dword [ebp - 0x48], esi
push 0
lea ecx, [ebp - 0x4c]
push ecx
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x43c101
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._n__C11WiniNet_WriteFile_Error:__d
lea edx, [ebp - 0x14]
push edx
call fcn.00428a30
add esp, 0xc
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 4], 0xffffffff
jmp 0x43c1ec
test esi, esi
jne 0x43c191
mov esi, dword [ebp - 0x18]
push esi
mov ecx, dword [ebp - 0x28]
push ecx
mov ecx, esi
call fcn.0043bad0
push esi
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [ebp - 0x30], 1
mov dword [ebp - 4], 0xffffffff
jmp 0x43c1ec
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call fcn.0043bad0
mov eax, dword [ebp - 0x18]
push eax
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test esi, esi
je 0x43c181
push esi
push str._n__C11WiniNet_InternetReadFile_Fail_and_Finish_leaveByte_d
lea ecx, [ebp - 0x14]
push ecx
call fcn.00428a30
add esp, 0xc
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 0x30], 1
mov dword [ebp - 4], 0xffffffff
jmp 0x43c1ec
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x18]
call fcn.0043bb50
test eax, eax
je 0x43c074
mov dword [ebp - 4], 0xffffffff
jmp 0x43c1ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._n__C11WiniNet_InternetReadFile_Error:__d
lea ecx, [ebp - 0x14]
push ecx
call fcn.00428a30
add esp, 0xc
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 4], 0xffffffff
jmp 0x43c1ec
cmp edi, 0xffffffff
je 0x43c1f8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x43c205
push ebx
call fcn.005001ec
add esp, 4
mov eax, dword [ebp - 0x28]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
test eax, eax
je 0x43c215
push eax
call esi
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x43c21f
push eax
call esi
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x43c229
push eax
call esi
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x43c233
push eax
call esi
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43c252
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
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 0x14