Function at 0x467c4c
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
mov ebp, esp
add esp, 0xffffffc0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ecx
mov edi, edx
mov esi, eax
xor eax, eax
push ebp
push 0x4683c4
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0xc], eax
lea eax, [esi + 0x48]
call fcn.00404740
mov dword [esi + 0x54], 0x3e7
mov dword [esi + 0x58], 0x3e7
mov dword [esi + 0x50], 0xffffffff
cmp dword [esi + 0x40], 0
je 0x467cbc
mov edx, dword [esi + 0x40]
mov eax, dword [esi + 0x10]
call fcn.00462ff4
lea eax, [esi + 0x40]
call fcn.00404740
mov edx, edi
mov eax, dword [esi + 0x10]
call fcn.00462ff4
test al, al
je 0x468393
mov edi, dword [esi + 0x10]
mov eax, dword [edi + 8]
mov edx, dword [edi + 0x1c]
call fcn.00404b5c
jne 0x467cec
mov ax, word [edi + 0xc]
cmp ax, word [edi + 0xe]
je 0x467dcd
mov eax, esi
call fcn.004687a8
push 0
push 0
push 0
push 0
mov eax, dword [esi + 0x2c]
call fcn.00404c10
push eax
call sub.wininet.dll_InternetOpenA
mov edi, eax
mov dword [esi + 0x18], edi
test edi, edi
jne 0x467d1e
mov dword [esi + 0x58], 0x37a
jmp 0x4682ff
push 0x466dc4
mov eax, dword [esi + 0x18]
push eax
call sub.wininet.dll_InternetSetStatusCallback
cmp byte [esi + 0x78], 0
je 0x467d76
mov eax, 0x466dc4
test eax, eax
jns 0x467d40
call fcn.00403940
push eax
push 0
push 3
mov edi, dword [esi + 0x10]
mov eax, dword [edi + 0x14]
call fcn.00404c10
push eax
mov eax, dword [edi + 0x10]
call fcn.00404c10
push eax
mov ax, word [edi + 0xc]
push eax
mov eax, dword [edi + 8]
call fcn.00404c10
push eax
mov eax, dword [esi + 0x18]
push eax
call sub.wininet.dll_InternetConnectA
mov dword [esi + 0x1c], eax
jmp 0x467dbb
mov eax, 0x466dc4
test eax, eax
jns 0x467d84
call fcn.00403940
push eax
push 0
push 3
mov eax, dword [esi + 0x80]
call fcn.00404c10
push eax
mov eax, dword [esi + 0x7c]
call fcn.00404c10
push eax
mov edi, dword [esi + 0x10]
mov ax, word [edi + 0xc]
push eax
mov eax, dword [edi + 8]
call fcn.00404c10
push eax
mov eax, dword [esi + 0x18]
push eax
call sub.wininet.dll_InternetConnectA
mov dword [esi + 0x1c], eax
cmp dword [esi + 0x1c], 0
jne 0x467dcd
mov dword [esi + 0x58], 0x384
jmp 0x4682ff
imul eax, dword [esi + 0x4c], 0x3e8
jno 0x467ddb
call fcn.00403948
test eax, eax
jns 0x467de4
call fcn.00403940
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 2
mov eax, dword [esi + 0x1c]
push eax
call sub.wininet.dll_InternetQueryOptionA
push 4
lea eax, [ebp - 0x14]
push eax
push 2
mov eax, dword [esi + 0x1c]
push eax
call sub.wininet.dll_InternetSetOptionA
push 4
lea eax, [ebp - 0x14]
push eax
push 6
mov eax, dword [esi + 0x1c]
push eax
call sub.wininet.dll_InternetSetOptionA
cmp byte [esi + 0x14], 0
je 0x467e31
lea eax, [ebp - 0x10]
mov edx, 0x4683e0
call fcn.004047d8
jmp 0x467e53
cmp dword [ebp - 8], 0
jne 0x467e46
lea eax, [ebp - 0x10]
mov edx, 0x4683f0
call fcn.004047d8
jmp 0x467e53
lea eax, [ebp - 0x10]
mov edx, 0x4683e0
call fcn.004047d8
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 4]
mov edx, 0x4683fc
call fcn.00404b5c
jne 0x467e6e
mov dword [ebp - 0x2c], 0x80f000
jmp 0x467e73
xor eax, eax
mov dword [ebp - 0x2c], eax
or dword [ebp - 0x2c], 0x80000000
cmp dword [esi + 8], 0
je 0x467e87
or dword [ebp - 0x2c], 0x80000
cmp byte [esi + 0x24], 0
jne 0x467e94
or dword [ebp - 0x2c], 0x4000000
cmp byte [esi + 4], 0
je 0x467ea1
or dword [ebp - 0x2c], 0x400000
cmp byte [esi + 5], 0
jne 0x467eae
or dword [ebp - 0x2c], 0x200000
mov edi, dword [esi + 0x84]
sub edi, 1
jno 0x467ebe
call fcn.00403948
mov eax, 0x466dc4
test eax, eax
jns 0x467ecc
call fcn.00403940
push eax
mov eax, dword [ebp - 0x2c]
push eax
lea eax, [esi + 0x28]
push eax
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x20]
call fcn.00404c10
push eax
mov eax, dword [esi + 0x30]
call fcn.00404c10
push eax
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x18]
call fcn.00404c10
push eax
mov eax, dword [ebp - 0x10]
call fcn.00404c10
push eax
mov eax, dword [esi + 0x1c]
push eax
call sub.wininet.dll_HttpOpenRequestA
mov dword [esi + 0x20], eax
cmp dword [esi + 0x20], 0
jne 0x467f1d
mov dword [esi + 0x58], 0x38e
jmp 0x467fcb
lea edx, [ebp - 0x30]
mov eax, dword [esi + 0x20]
call fcn.00466dac
mov edx, dword [ebp - 0x30]
mov eax, dword [0x474f90]
call fcn.00466bec
test eax, eax
jne 0x467f53
lea edx, [ebp - 0x34]
mov eax, dword [esi + 0x20]
call fcn.00466dac
mov edx, dword [ebp - 0x34]
mov ecx, esi
mov eax, dword [0x474f90]
call fcn.00466ac0
mov edx, dword [esi + 0x20]
mov eax, esi
call fcn.00468af8
mov eax, dword [ebp - 0x10]
mov edx, 0x4683f0
call fcn.00404b5c
jne 0x467f85
push 0
push 0
push 0
push 0
mov eax, dword [esi + 0x20]
push eax
call sub.wininet.dll_HttpSendRequestA
cmp eax, 1
sbb ebx, ebx
inc ebx
jmp 0x467fb3
mov eax, dword [ebp - 8]
call fcn.00404a10
test eax, eax
jns 0x467f96
call fcn.00403940
push eax
mov eax, dword [ebp - 8]
call fcn.00404c10
push eax
push 0
push 0
mov eax, dword [esi + 0x20]
push eax
call sub.wininet.dll_HttpSendRequestA
cmp eax, 1
sbb ebx, ebx
inc ebx
cmp edi, 1
jl 0x467fcb
test bl, bl
jne 0x467fc3
push 0x64
call sub.kernel32.dll_Sleep_1
test bl, bl
je 0x467eb4
test bl, bl
jne 0x467fdb
mov dword [esi + 0x58], 0x398
jmp 0x4682ff
mov edx, dword [esi + 0x20]
mov eax, esi
call fcn.00468850
cmp dword [esi + 8], 0
je 0x467fff
lea edx, [ebp - 0x38]
mov eax, esi
call fcn.0046883c
mov edx, dword [ebp - 0x38]
mov eax, esi
call fcn.00468940
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x20000013
mov eax, dword [esi + 0x20]
push eax
call sub.wininet.dll_HttpQueryInfoA
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x468063
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x7a
jne 0x468063
mov dword [ebp - 0x18], 4
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x20000013
mov eax, dword [esi + 0x20]
push eax
call sub.wininet.dll_HttpQueryInfoA
cmp eax, 1
sbb ebx, ebx
inc ebx
mov eax, dword [ebp - 0x14]
test eax, eax
jns 0x46806f
call fcn.00403940
mov dword [esi + 0x54], eax
test bl, bl
je 0x468088
cmp dword [ebp - 0x14], 0xc8
jb 0x468088
cmp dword [ebp - 0x14], 0x12b
jbe 0x468094
mov dword [esi + 0x58], 0x3a2
jmp 0x4682ff
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x20000005
mov eax, dword [esi + 0x20]
push eax
call sub.wininet.dll_HttpQueryInfoA
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x468101
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x7a
jne 0x468101
mov dword [ebp - 0x18], 4
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x20000005
mov eax, dword [esi + 0x20]
push eax
call sub.wininet.dll_HttpQueryInfoA
mov eax, dword [ebp - 0x14]
test eax, eax
jns 0x4680fe
call fcn.00403940
mov dword [esi + 0x50], eax
mov dword [ebp - 0x18], 0x1000
mov eax, dword [ebp - 0x18]
push eax
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x467c18]
call fcn.00405bf8
add esp, 4
cmp dword [ebp + 0xc], 0
je 0x46815a
push 0
push 0x20
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp + 0xc]
call fcn.00404c10
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x46815a
mov dword [esi + 0x58], 0x3ac
jmp 0x4682ff
lea eax, [esi + 0x48]
call fcn.00404740
xor eax, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 4]
call fcn.00405a3c
mov edx, eax
xor eax, eax
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x46817f
cmp eax, dword [ecx - 4]
jb 0x468184
call fcn.00403940
lea eax, [ecx + eax]
xor ecx, ecx
call fcn.004031a4
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [esi + 0x20]
push eax
call sub.wininet.dll_InternetReadFile
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x4681b9
mov dword [esi + 0x58], 0x3b6
jmp 0x4682ab
cmp dword [ebp - 0x1c], 0
jne 0x4681cb
mov dword [esi + 0x58], 0x3b7
jmp 0x4682ab
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x1c]
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.00404c70
mov edx, dword [ebp - 0x3c]
lea eax, [esi + 0x48]
call fcn.00404a18
cmp dword [ebp + 0xc], 0
je 0x468259
push 0
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x1c]
push eax
xor eax, eax
mov edx, dword [ebp - 4]
test edx, edx
je 0x468208
cmp eax, dword [edx - 4]
jb 0x46820d
call fcn.00403940
lea eax, [edx + eax]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_WriteFile_1
mov eax, dword [ebp - 0x24]
add dword [ebp - 0x28], eax
jae 0x468227
call fcn.00403948
cmp dword [esi + 0x5c], 0
je 0x468239
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
call dword [esi + 0x5c]
cmp word [esi + 0x62], 0
je 0x468167
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov eax, dword [esi + 0x64]
call dword [esi + 0x60]
jmp 0x468167
cmp dword [esi + 0x5c], 0
je 0x46827b
mov eax, dword [esi + 0x48]
call fcn.00404a10
mov edx, eax
test edx, edx
jns 0x468272
call fcn.00403940
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
call dword [esi + 0x5c]
cmp word [esi + 0x62], 0
je 0x468167
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [esi + 0x48]
call fcn.00404a10
mov ecx, eax
test ecx, ecx
jns 0x46829d
call fcn.00403940
mov edx, dword [ebp - 0x1c]
mov eax, dword [esi + 0x64]
call dword [esi + 0x60]
jmp 0x468167
cmp dword [ebp + 0xc], 0
je 0x4682ba
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 0x14], 0
jbe 0x4682ea
cmp dword [ebp + 0xc], 0
jne 0x4682db
mov eax, dword [esi + 0x48]
call fcn.00404a10
test eax, eax
jle 0x4682f1
mov dword [ebp - 0xc], 0xffffffff
jmp 0x4682f1
cmp dword [ebp - 0x28], 0
jbe 0x4682f1
mov dword [ebp - 0xc], 0xffffffff
jmp 0x4682f1
mov dword [ebp - 0xc], 0xffffffff
cmp dword [esi + 0x58], 0x3b7
jne 0x4682ff
xor eax, eax
mov dword [esi + 0x58], eax
mov eax, dword [ebp - 4]
call fcn.00405a3c
test eax, eax
jle 0x468332
mov eax, dword [ebp - 4]
call fcn.00405a3c
mov edx, eax
xor eax, eax
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x468323
cmp eax, dword [ecx - 4]
jb 0x468328
call fcn.00403940
lea eax, [ecx + eax]
xor ecx, ecx
call fcn.004031a4
push 0
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x467c18]
call fcn.00405bf8
add esp, 4
lea edx, [ebp - 0x40]
mov eax, dword [esi + 0x20]
call fcn.00466dac
mov edx, dword [ebp - 0x40]
mov eax, dword [0x474f90]
call fcn.00466c58
mov eax, dword [esi + 0x20]
push eax
call sub.wininet.dll_InternetCloseHandle
cmp dword [ebp - 0xc], 0
je 0x468393
cmp dword [esi + 0x68], 0
je 0x468380
lea edx, [esi + 0x48]
mov eax, dword [esi + 0x48]
call dword [esi + 0x68]
cmp word [esi + 0x72], 0
je 0x468393
lea ecx, [esi + 0x48]
mov edx, dword [esi + 0x48]
mov eax, dword [esi + 0x74]
call dword [esi + 0x70]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4683cb
lea eax, [ebp - 0x40]
mov edx, 5
call fcn.00404764
lea eax, [ebp - 0x10]
call fcn.00404740
lea eax, [ebp - 4]
mov edx, dword [0x467c18]
call fcn.00405c04
ret