Function at 0x41d875
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcd4
push ebx
push esi
lea eax, [ebp - 0x14]
push edi
push eax
mov edi, 0x400
lea eax, [ebp - 0xb44]
push edi
push eax
lea eax, [ebp - 0x344]
push 0x100
push eax
lea eax, [ebp - 0x44]
push 0x14
push eax
mov dword [ebp - 4], ecx
push dword [ebp + 8]
call fcn.00402af4
lea eax, [ebp - 0x44]
push str.HTTP
push eax
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
jne 0x41d933
lea eax, [ebp - 0xcd4]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x41d933
xor ebx, ebx
push ebx
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp + 8], esi
je 0x41d933
push dword [ebp - 0x14]
mov word [ebp - 0x30], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x2e], ax
lea eax, [ebp - 0x344]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
jne 0x41d918
xor eax, eax
jmp 0x41d91f
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x30]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x41d93b
push 1
pop eax
jmp 0x41dcd3
cmp byte [ebp - 0xb44], bl
jne 0x41d956
push edi
lea eax, [ebp - 0xb44]
push 0x8aaf58
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp dword [ebp + 0x10], ebx
push ebx
jne 0x41d96d
mov edi, str.GET
push edi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push edi
push esi
jmp 0x41d97e
mov edi, str.POST
push edi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push edi
push dword [ebp + 8]
mov esi, dword [sym.imp.WS2_32.dll_send]
call esi
lea eax, [ebp - 0x744]
push edi
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
lea eax, [ebp - 0xb44]
pop ecx
push ebx
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0xb44]
push eax
push dword [ebp + 8]
call esi
lea eax, [ebp - 0xb44]
push eax
lea eax, [ebp - 0x744]
push eax
call sub.MSVCRT.dll_strcat
pop ecx
mov edi, str._HTTP_1.0_r_n
pop ecx
push ebx
push edi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push edi
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x744]
push edi
push eax
call sub.MSVCRT.dll_strcat
pop ecx
mov edi, str.Accept:_image_gif__image_x_xbitmap__image_jpeg__image_pjpeg__application_vnd.ms_excel__application_msword__application_vnd.ms_powerpoint____r_n
pop ecx
push ebx
push edi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push edi
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x744]
push edi
push eax
call sub.MSVCRT.dll_strcat
pop ecx
mov edi, str.Accept_Language:_en_us_r_n
pop ecx
push ebx
push edi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push edi
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x744]
push edi
push eax
call sub.MSVCRT.dll_strcat
pop ecx
mov edi, str.Accept_Encoding:_gzip__deflate_r_n
pop ecx
push ebx
push edi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push edi
push dword [ebp + 8]
call esi
push edi
lea eax, [ebp - 0x744]
push eax
call sub.MSVCRT.dll_strcat
pop ecx
mov edi, str.User_Agent:_Mozilla_4.0_r_n
pop ecx
push ebx
push edi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push edi
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x744]
push edi
push eax
call sub.MSVCRT.dll_strcat
cmp dword [ebp + 0x14], ebx
pop ecx
pop ecx
je 0x41dac1
push dword [ebp + 0x14]
lea eax, [ebp - 0x244]
push str.Content_Length:__ld_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x244]
push ebx
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x244]
push eax
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x744]
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
mov edi, str.Host:
push ebx
push edi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push edi
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x744]
push edi
push eax
call sub.MSVCRT.dll_strcat
pop ecx
lea eax, [ebp - 0x344]
pop ecx
push ebx
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x344]
push eax
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x344]
push eax
lea eax, [ebp - 0x744]
push eax
call sub.MSVCRT.dll_strcat
pop ecx
mov edi, 0x8aaed8
pop ecx
push ebx
push edi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push edi
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x744]
push edi
push eax
call sub.MSVCRT.dll_strcat
mov eax, dword [ebp + 0xc]
pop ecx
cmp eax, ebx
pop ecx
je 0x41db64
cmp byte [eax], bl
je 0x41db64
push ebx
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call esi
push dword [ebp + 0xc]
lea eax, [ebp - 0x744]
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
push ebx
push edi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push edi
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x744]
push edi
push eax
call sub.MSVCRT.dll_strcat
mov edi, dword [ebp + 0x10]
pop ecx
cmp edi, ebx
pop ecx
je 0x41dbad
cmp dword [ebp + 0x14], ebx
je 0x41dbad
push ebx
push dword [ebp + 0x14]
push edi
push dword [ebp + 8]
call esi
mov eax, dword [ebp + 0x14]
push edi
mov byte [edi + eax], bl
lea eax, [ebp - 0x744]
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
lea eax, [ebp - 0x744]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, dword [ebp + 0x18]
lea ecx, [ebp - 0x744]
push ecx
push eax
mov dword [esi], eax
call sub.MSVCRT.dll_strcpy
pop ecx
lea eax, [ebp - 0x10]
pop ecx
mov ecx, dword [ebp - 4]
push eax
call fcn.0040139d
mov edi, dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp + 0xc], ebx
mov dword [ebp + 0x10], ebx
push ebx
lea eax, [ebp - 0x244]
push 1
push eax
push dword [ebp + 8]
call edi
test eax, eax
jge 0x41dc12
mov dword [ebp + 0x10], 1
mov al, byte [ebp - 0x244]
cmp al, 0xa
je 0x41dc25
cmp al, 0xd
je 0x41dc34
inc dword [ebp + 0xc]
jmp 0x41dc34
cmp dword [ebp + 0xc], ebx
jne 0x41dc31
mov dword [ebp + 0x10], 1
mov dword [ebp + 0xc], ebx
mov byte [ebp + 0x17], al
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 8]
jb 0x41dc4e
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x10]
push eax
call fcn.004012b7
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp + 0x17]
mov byte [ecx], al
inc dword [ebp - 0xc]
cmp dword [ebp + 0x10], ebx
je 0x41dbf8
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0xc]
mov byte [eax], bl
lea eax, [ebp - 0x20]
push eax
call fcn.0040139d
push ebx
mov esi, 0x1ff
lea eax, [ebp - 0x244]
push esi
push eax
push dword [ebp + 8]
call edi
cmp eax, ebx
mov dword [ebp + 0x14], eax
jl 0x41dcb2
mov ecx, dword [ebp - 4]
mov byte [ebp + eax - 0x244], bl
push eax
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.004013c5
cmp dword [ebp + 0x14], ebx
jle 0x41dcb2
push ebx
jmp 0x41dc7b
mov eax, dword [ebp - 0x1c]
push dword [ebp + 8]
mov byte [eax], bl
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 0x18]
sub edx, ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14