Function at 0x10009210
Capabilities:
Check http status code
Connect to http server
Create http request
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:
sub esp, 0xb2c
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [esp + 0x30], esi
mov dword [esi + 0x804], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], ebx
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x33c]
push eax
mov eax, dword [esp + 0xb44]
lea edx, [esp + 0x23c]
push ecx
push edx
push eax
mov ecx, esi
call fcn.10009040
test eax, eax
je 0x1000956a
push 0
push 0
push 0
push 0
push str.ProxyDown
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
test edi, edi
mov dword [esp + 0x20], edi
je 0x1000952a
mov ecx, dword [esp + 0x2c]
push 0
push 0
push 3
push str.HTTP_1.0
push 0x10013858
lea edx, [esp + 0x24c]
push ecx
push edx
push edi
call dword [sym.imp.WININET.dll_InternetConnectA]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x18], ebp
je 0x10009523
mov edi, dword [esp + 0xb54]
push 0
push 0x80000000
push 0
test edi, edi
push 0
push str.HTTP_1.0
jne 0x100092e9
lea eax, [esp + 0x350]
push eax
push 0x1001366c
jmp 0x100092f6
lea ecx, [esp + 0x350]
push ecx
push str.POST
push ebp
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov ebx, eax
test ebx, ebx
je 0x10009514
mov edx, dword [esp + 0xb58]
push edx
push edi
push 0
push 0
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x1000950d
lea eax, [esp + 0x24]
push 0
lea ecx, [esp + 0x38]
push eax
push ecx
push 0x13
push ebx
mov dword [esp + 0x38], 0x100
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x1000935a
lea edx, [esp + 0x34]
push edx
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 4
mov dword [esp + 0x28], eax
cmp dword [esp + 0x28], 0xc8
jne 0x1000950d
mov al, byte [esp + 0xb50]
test al, al
je 0x1000941a
mov edi, dword [esp + 0xb4c]
lea eax, [esp + 0x134]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x134]
push 0
push ecx
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
cmp eax, 0xffffffff
je 0x100093f6
push 0x10013660
push edi
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x14], edi
jne 0x100093cb
mov dword [esp + 0x10], 4
jmp 0x1000950d
push 2
push 0
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
push edi
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 0x10
push 0
push 0
push 0
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetSetFilePointer]
add dword [esi + 0x804], eax
jmp 0x10009438
push 0x1001306c
push edi
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x10009438
mov dword [esp + 0x10], 4
jmp 0x1000950d
mov ecx, dword [esp + 0xb48]
mov edi, dword [esp + 0xb44]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea ebp, [esi + 4]
mov ecx, 0x200
xor eax, eax
mov edi, ebp
mov dword [esp + 0x10], eax
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
push eax
push 0x400
push ebp
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, 1
jne 0x100094ef
mov al, byte [esp + 0xb50]
test al, al
je 0x10009493
mov edi, dword [esp + 0x14]
test edi, edi
je 0x100094cd
mov ecx, dword [esp + 0x10]
push edi
push ecx
push 1
push ebp
call dword [sym.imp.MSVCRT.dll_fwrite]
push edi
call dword [sym.imp.MSVCRT.dll_fflush]
add esp, 0x14
jmp 0x100094cd
mov eax, dword [esi + 0x804]
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0xb48]
lea edx, [eax + ecx]
cmp edx, edi
ja 0x10009501
mov edx, dword [esp + 0xb44]
mov esi, ebp
lea edi, [eax + edx]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov edx, dword [esi + 0x804]
add edx, eax
cmp eax, 0x400
mov dword [esi + 0x804], edx
jb 0x1000957c
jmp 0x1000943b
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10009501
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x10], 5
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x10]
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 3
mov dword [esp + 0x10], ebx
jge 0x100095cf
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10009240
xor eax, eax
cmp ebx, 3
setl al
pop edi
dec eax
pop esi
pop ebp
and eax, 0xfffffc13
pop ebx
add esp, 0xb2c
ret 0x1c
pop edi
pop esi
pop ebp
mov eax, 0xffffff9c
pop ebx
add esp, 0xb2c
ret 0x1c
mov al, byte [esp + 0xb50]
test al, al
je 0x10009595
test edi, edi
je 0x10009595
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
test ebx, ebx
je 0x100095a4
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call edi
jmp 0x100095aa
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x100095b5
push eax
call edi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x100095c0
push eax
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xb2c
ret 0x1c
pop edi
pop esi
pop ebp
mov eax, 0xfffffc16
pop ebx
add esp, 0xb2c
ret 0x1c