Function at 0x40ba4c
Capabilities:
Connect socket
Delete file
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x802c
call fcn.00411d00
push ebx
push esi
mov esi, ecx
push edi
xor ebx, ebx
push 0x45f6f8
lea edi, [esi + 0x13b8]
mov dword [esi + 0x12ac], ebx
push edi
mov dword [esi + 0x12b0], 0x10000
call fcn.00411780
cmp dword [ebp + 0x10], ebx
pop ecx
pop ecx
je 0x40ba91
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esi + 0x12ac], ebx
je 0x40baa7
mov ecx, esi
call fcn.0040c07a
push 2
jmp 0x40bf8d
push dword [ebp + 8]
lea eax, [esi + 0x404]
push eax
call fcn.00411780
cmp dword [esi + 0x12ac], ebx
pop ecx
pop ecx
mov dword [esi + 0x14d0], ebx
jne 0x40ba99
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x40bb09
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 0xc]
push 0x459a00
push edi
call fcn.0041172e
add esp, 0x10
mov eax, 0x1001
jmp 0x40bfdd
mov edx, 0x1000
xor eax, eax
mov ecx, edx
lea edi, [ebp - 0x802b]
mov byte [ebp - 0x802c], bl
mov byte [ebp - 0x4028], bl
rep stosd dword es:[edi], eax
mov ecx, edx
lea edi, [ebp - 0x4027]
mov dword [esi + 0x14d4], ebx
mov dword [ebp - 8], ebx
rep stosd dword es:[edi], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
cmp dword [esi + 0x818], ebx
jle 0x40bfb9
mov dword [ebp + 0x10], ebx
cmp dword [esi + 0x12ac], ebx
jne 0x40bf9d
lea edi, [esi + 0x804]
lea eax, [esi + 0x304]
push edi
lea ecx, [esi + 0x204]
push eax
lea eax, [esi + 0x404]
push ecx
push eax
mov ecx, esi
call fcn.0040c355
test eax, eax
je 0x40bf83
cmp dword [esi + 0x12ac], ebx
jne 0x40bf9d
push dword [edi]
lea eax, [esi + 0x204]
mov ecx, esi
push eax
call fcn.0040c097
test eax, eax
je 0x40bf87
mov ecx, esi
call fcn.0040bfe4
test eax, eax
je 0x40bf8b
cmp dword [esi + 0x12ac], ebx
jne 0x40bf9d
lea eax, [esi + 0x14bc]
push 0x10
push eax
push dword [esi + 0x14b8]
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x40bbf2
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x274c
jne 0x40bf90
jmp 0x40be89
cmp dword [esi + 0x12ac], ebx
jne 0x40bf9d
push 0x4001
lea eax, [ebp - 0x4028]
push ebx
push eax
call fcn.004129e0
add esp, 0xc
cmp dword [esi + 0x81c], ebx
jne 0x40bc7d
lea eax, [esi + 0x304]
push eax
lea eax, [ebp - 0x4028]
push str.GET__s__HTTP_1.1_r_n
push eax
call fcn.0041172e
add esp, 0xc
cmp dword [esi + 0x8a4], ebx
je 0x40bcd8
lea eax, [ebp - 0x4028]
push str.Authorization:_Basic
push eax
call fcn.00411790
lea eax, [esi + 0x9a8]
push eax
lea eax, [ebp - 0x4028]
push eax
call fcn.00411790
mov edi, 0x4599d0
lea eax, [ebp - 0x4028]
push edi
push eax
call fcn.00411790
add esp, 0x18
jmp 0x40bcdd
lea eax, [esi + 0x404]
push eax
lea eax, [ebp - 0x4028]
push str.GET__s__HTTP_1.1_r_n
push eax
call fcn.0041172e
add esp, 0xc
cmp dword [esi + 0xda8], ebx
je 0x40bcd8
lea eax, [ebp - 0x4028]
push str.Proxy_Authorization:_Basic
push eax
call fcn.00411790
lea eax, [esi + 0xeac]
push eax
lea eax, [ebp - 0x4028]
push eax
call fcn.00411790
lea eax, [ebp - 0x4028]
push 0x4599d0
push eax
call fcn.00411790
add esp, 0x18
mov edi, 0x4599d0
lea eax, [ebp - 0x4028]
push str.Host:
push eax
call fcn.00411790
lea eax, [esi + 0x204]
push eax
lea eax, [ebp - 0x4028]
push eax
call fcn.00411790
lea eax, [ebp - 0x4028]
push edi
push eax
call fcn.00411790
lea eax, [ebp - 0x4028]
push str.Accept:___r_n
push eax
call fcn.00411790
lea eax, [ebp - 0x4028]
push str.Pragma:_no_cache_r_n
push eax
call fcn.00411790
lea eax, [ebp - 0x4028]
push str.Cache_Control:_no_cache_r_n
push eax
call fcn.00411790
lea eax, [ebp - 0x4028]
push str.User_Agent:
push eax
call fcn.00411790
lea eax, [esi + 0x104]
push eax
lea eax, [ebp - 0x4028]
push eax
call fcn.00411790
add esp, 0x40
lea eax, [ebp - 0x4028]
push edi
push eax
call fcn.00411790
lea eax, [ebp - 0x4028]
push str.Referer:
push eax
call fcn.00411790
lea eax, [esi + 4]
push eax
lea eax, [ebp - 0x4028]
push eax
call fcn.00411790
lea eax, [ebp - 0x4028]
push edi
push eax
call fcn.00411790
lea eax, [ebp - 0x4028]
push str.Connection:_close_r_n
push eax
call fcn.00411790
lea eax, [ebp - 0x4028]
push edi
push eax
call fcn.00411790
add esp, 0x30
cmp dword [esi + 0x12ac], ebx
jne 0x40bf9d
lea eax, [ebp - 0x4028]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x4028]
push eax
push dword [esi + 0x14b8]
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x40be37
cmp dword [esi + 0x12ac], ebx
jne 0x40bf9d
push 0x4001
lea eax, [ebp - 0x802c]
push ebx
push eax
call fcn.004129e0
add esp, 0xc
lea eax, [ebp - 0x802c]
push 2
pop edi
push edi
push 0x4000
push eax
push dword [esi + 0x14b8]
call sub.WS2_32.dll_recv
cmp eax, 0xffffffff
jne 0x40be49
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x274c
jne 0x40bfa2
jmp 0x40be89
cmp dword [esi + 0x12ac], ebx
jne 0x40bfae
push ebx
lea eax, [ebp - 0x24]
push ebx
push eax
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x802c]
push eax
lea eax, [esi + 0x404]
push eax
call fcn.0040c6c2
cmp eax, ebx
je 0x40bea7
cmp eax, 1
jne 0x40bf94
push dword [esi + 0x814]
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp + 0x10]
mov eax, dword [ebp + 0x10]
cmp eax, dword [esi + 0x818]
jl 0x40bb4e
cmp dword [esi + 0x12ac], ebx
jne 0x40bf9d
mov eax, dword [ebp - 8]
push 1
pop edi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], eax
mov dword [ebp + 8], ebx
mov dword [ebp - 0xc], edi
mov dword [ebp + 0x10], ebx
cmp dword [esi + 0x12ac], ebx
jne 0x40bf9d
push 0x4001
lea eax, [ebp - 0x802c]
push ebx
push eax
call fcn.004129e0
add esp, 0xc
lea eax, [ebp - 0x802c]
push ebx
push 0x4000
push eax
push dword [esi + 0x14b8]
call sub.WS2_32.dll_recv
cmp eax, 0xffffffff
je 0x40bf51
cmp eax, ebx
je 0x40bf5d
cmp dword [ebp - 0xc], ebx
je 0x40bf19
cmp eax, dword [ebp - 4]
jl 0x40bf5d
mov dword [ebp - 0xc], ebx
jmp 0x40bf1c
mov dword [ebp - 4], ebx
mov ecx, dword [ebp - 4]
push ebx
sub eax, ecx
mov edi, eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + ecx - 0x802c]
push edi
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40bfa9
add dword [ebp + 8], edi
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x1c]
jae 0x40bf60
push 1
pop edi
jmp 0x40bec8
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x274c
jne 0x40bfa2
mov dword [ebp + 0x10], edi
mov ecx, esi
call fcn.0040c07a
cmp dword [ebp + 0x10], ebx
je 0x40bfb9
push dword [esi + 0x814]
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [esi + 0x818]
jmp 0x40bb3f
push 1
jmp 0x40bf8d
push 8
jmp 0x40bf8d
push 0x10
pop eax
jmp 0x40bfdd
push 4
jmp 0x40bf9f
cmp eax, 4
jne 0x40bfa2
push 0x20
jmp 0x40bf9f
push 2
pop edi
jmp 0x40bfae
mov edi, 0xffff
jmp 0x40bfae
mov edi, 0x1004
mov ecx, esi
call fcn.0040c07a
mov eax, edi
jmp 0x40bfdd
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x12b0]
test ax, 0xffff
je 0x40bfdd
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esi + 0x12b0]
pop edi
pop esi
pop ebx
leave
ret 0xc