Function at 0x42fab0
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Get http content length
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
lea ebp, [esp - 0x3078]
mov eax, 0x3078
call fcn.004c3410
push 0xffffffffffffffff
push 0x586ba0
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x5f4760]
xor eax, ebp
mov dword [ebp + 0x3074], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov eax, dword [ebp + 0x3084]
mov dword [ebp - 0x1c], eax
xor ebx, ebx
cmp edi, ebx
je 0x42fcdd
cmp eax, ebx
je 0x42fcdd
mov dword [ebp - 4], ebx
mov byte [ebp + 0x2854], bl
push 0x7ff
push ebx
lea eax, [ebp + 0x2855]
push eax
call fcn.004add60
mov eax, 0xf
mov dword [ebp + 0x34], eax
mov dword [ebp + 0x30], ebx
mov byte [ebp + 0x20], bl
mov byte [ebp - 4], 1
mov dword [ebp + 0x50], eax
mov dword [ebp + 0x4c], ebx
mov byte [ebp + 0x3c], bl
mov byte [ebp - 4], 2
push 0x7ff
push edi
lea ecx, [ebp + 0x2854]
push ecx
call fcn.004a5b40
add esp, 0x18
xor esi, esi
mov dword [ebp - 0x30], esi
cmp esi, 4
jge 0x42fb8e
movsx edx, byte [edi + esi]
push edx
call fcn.004a5dea
add esp, 4
test eax, eax
je 0x42fb8b
movsx eax, byte [edi + esi]
push eax
call fcn.004a5a65
add esp, 4
mov byte [ebp + esi + 0x2854], al
inc esi
jmp 0x42fb5e
lea ecx, [ebp + 0x2854]
push ecx
lea ecx, [ebp]
call fcn.00403ca0
mov byte [ebp - 4], 3
push 7
push str.http:__
lea edx, [ebp]
push edx
call fcn.00430670
cmp eax, 0xffffffff
je 0x42fcba
add eax, 7
push eax
push ebx
lea ecx, [ebp]
call fcn.00402220
push 1
push 0x5d54e8
lea eax, [ebp]
push eax
call fcn.00430670
mov esi, eax
cmp esi, 0xffffffff
je 0x42fcba
push esi
lea ecx, [ebp - 0x50]
push ecx
xor ecx, ecx
lea edx, [ebp]
call fcn.00403620
mov byte [ebp - 4], 4
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x1c]
call fcn.004022b0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x50]
call fcn.00403ce0
push esi
push ebx
lea ecx, [ebp]
call fcn.00402220
push 0xffffffffffffffff
push ebx
lea edx, [ebp]
push edx
lea ecx, [ebp + 0x38]
call fcn.004022b0
push ebx
push ebx
push ebx
cmp dword [ebp + 0x3080], ebx
je 0x42fc40
push ebx
push ebx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov esi, eax
mov dword [ebp - 0x14], esi
jmp 0x42fc4e
push 1
push ebx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x14], eax
mov esi, eax
cmp esi, ebx
je 0x42fcba
mov byte [ebp + 0x2054], bl
push 0x3ff
push ebx
lea eax, [ebp + 0x2055]
push eax
call fcn.004add60
mov byte [ebp + 0x2454], bl
push 0x3ff
push ebx
lea ecx, [ebp + 0x2455]
push ecx
call fcn.004add60
add esp, 0x18
cmp dword [ebp + 0x34], 0x10
mov eax, dword [ebp + 0x20]
jae 0x42fc91
lea eax, [ebp + 0x20]
push ebx
push ebx
push 3
lea edx, [ebp + 0x2454]
push edx
lea ecx, [ebp + 0x2054]
push ecx
push 0x50
push eax
push esi
call dword [sym.imp.WININET.dll_InternetConnectA]
mov edi, eax
cmp edi, ebx
jne 0x42fd04
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov byte [ebp - 4], 2
lea ecx, [ebp]
call fcn.00403ce0
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x38]
call fcn.00403ce0
mov byte [ebp - 4], bl
lea ecx, [ebp + 0x1c]
call fcn.00403ce0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x3074]
xor ecx, ebp
call fcn.004a314d
add ebp, 0x3078
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x50], 0x10
mov eax, dword [ebp + 0x3c]
jae 0x42fd10
lea eax, [ebp + 0x3c]
push 0x400000
push ebx
push ebx
push ebx
push ebx
push eax
push 0x5d54c0
push edi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov esi, eax
cmp esi, ebx
jne 0x42fd40
mov edx, dword [ebp - 0x14]
push edx
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
jmp 0x42fcba
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x42fd6a
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
push esi
call edi
jmp 0x42fcba
mov byte [ebp + 0x3054], bl
mov dword [ebp + 0x3055], ebx
mov dword [ebp + 0x3059], ebx
mov dword [ebp + 0x305d], ebx
mov dword [ebp + 0x3061], ebx
mov dword [ebp + 0x3065], ebx
mov dword [ebp + 0x3069], ebx
mov dword [ebp + 0x306d], ebx
mov word [ebp + 0x3071], bx
mov byte [ebp + 0x3073], bl
mov dword [ebp - 0x34], 0x20
push ebx
lea ecx, [ebp - 0x34]
push ecx
lea edx, [ebp + 0x3054]
push edx
push 0x13
push esi
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x42fd4f
lea ecx, [ebp + 0x3054]
push ecx
call fcn.004a3636
add esp, 4
cmp eax, 0xc8
je 0x42fdf4
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
mov edx, dword [ebp - 0x14]
push edx
call esi
jmp 0x42fcba
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x2c], 4
push ebx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x20]
push ecx
push 0x20000005
push esi
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x42fddd
push ebx
push 0x80
push 2
push ebx
push 1
push 0xc0000000
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x42fe50
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
mov ecx, dword [ebp - 0x14]
push ecx
call esi
jmp 0x42fcba
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], ebx
lea edx, [ebp - 0x18]
push edx
push 0x2000
lea eax, [ebp + 0x54]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x42fea7
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x42fea7
mov dword [ebp - 0x28], ebx
push ebx
lea ecx, [ebp - 0x28]
push ecx
push eax
lea edx, [ebp + 0x54]
push edx
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x28], eax
jne 0x42fea7
call fcn.0040f6e0
mov eax, dword [ebp - 0x24]
add eax, dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
cmp eax, dword [ebp - 0x20]
jb 0x42fe56
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
mov edx, dword [ebp - 0x14]
push edx
call esi
xor eax, eax
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 0x20]
sete al
mov esi, eax
mov byte [ebp - 4], 2
lea ecx, [ebp]
call fcn.00403ce0
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x38]
call fcn.00403ce0
mov byte [ebp - 4], bl
lea ecx, [ebp + 0x1c]
call fcn.00403ce0
mov eax, esi
jmp 0x42fcdf