Function at 0x10002cce
Capabilities:
Connect socket
Delete file
Download and write a file
Initialize winsock library
Receive and write data from server to client
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x15b8
call fcn.10014f70
push ebx
push esi
push edi
push 0x3f
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x21f]
mov byte [ebp - 0x220], bl
push 0x3f
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x11f]
mov byte [ebp - 0x120], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
lea edi, [ebp - 0xb]
mov byte [ebp - 0xc], bl
push 0x40
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x427]
mov byte [ebp - 0x428], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x323]
mov byte [ebp - 0x324], bl
mov edx, 0xff
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0xc27]
mov byte [ebp - 0xc28], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x827]
mov byte [ebp - 0x828], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x1027]
mov byte [ebp - 0x1028], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x10
lea eax, [ebp - 0x1c]
push ebx
push eax
mov dword [ebp - 0x20], 0x7530
call sub.MSVCRT.dll_memset
push dword [ebp + 0xc]
lea eax, [ebp - 0xc28]
push 0x10093664
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
mov esi, dword [sym.imp.MSVCRT.dll_strstr]
lea eax, [ebp - 0xc28]
push 0x1009381c
push eax
call esi
add esp, 0x20
test eax, eax
jne 0x10002e96
lea eax, [ebp - 0xc28]
push 0x10093814
push eax
call esi
pop ecx
test eax, eax
pop ecx
jne 0x10002e96
lea eax, [ebp - 0xc28]
push 0x2f
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
pop ecx
cmp eax, ebx
pop ecx
je 0x10002e0e
mov byte [eax], bl
inc eax
push eax
lea eax, [ebp - 0x428]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov esi, dword [sym.imp.MSVCRT.dll_strchr]
lea eax, [ebp - 0xc28]
push 0x3a
push eax
call esi
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp + 0xc], eax
je 0x10002e8b
mov byte [eax], bl
lea eax, [ebp - 0xc28]
push eax
lea eax, [ebp - 0x220]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x220]
push 0x2f
push eax
call esi
mov edi, eax
add esp, 0x10
cmp edi, ebx
mov esi, 0x10093604
je 0x10002e76
lea eax, [ebp - 0x120]
push esi
push eax
mov byte [edi], bl
call sub.MSVCRT.dll_strcat
inc edi
lea eax, [ebp - 0x120]
push edi
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
lea eax, [ebp - 0x120]
push esi
push eax
call sub.MSVCRT.dll_strcat
mov eax, dword [ebp + 0xc]
jmp 0x10002f35
lea eax, [ebp - 0xc28]
jmp 0x10002f3f
lea eax, [ebp - 0xc28]
push 0x2f
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
pop ecx
cmp eax, ebx
pop ecx
je 0x10002ebd
mov byte [eax], bl
inc eax
push eax
lea eax, [ebp - 0x428]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
mov esi, dword [sym.imp.MSVCRT.dll_strchr]
lea eax, [ebp - 0xc21]
push 0x3a
push eax
call esi
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp + 0xc], eax
je 0x10002f39
mov byte [eax], bl
lea eax, [ebp - 0xc21]
push eax
lea eax, [ebp - 0x220]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x220]
push 0x2f
push eax
call esi
mov edi, eax
add esp, 0x10
cmp edi, ebx
mov esi, 0x10093604
je 0x10002f25
lea eax, [ebp - 0x120]
push esi
push eax
mov byte [edi], bl
call sub.MSVCRT.dll_strcat
inc edi
lea eax, [ebp - 0x120]
push edi
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
lea eax, [ebp - 0x120]
push esi
push eax
call sub.MSVCRT.dll_strcat
mov eax, dword [ebp + 0xc]
inc eax
push eax
jmp 0x10002f97
lea eax, [ebp - 0xc21]
push eax
lea eax, [ebp - 0x220]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x220]
push 0x2f
push eax
call esi
mov edi, eax
add esp, 0x10
cmp edi, ebx
mov esi, 0x10093604
je 0x10002f85
lea eax, [ebp - 0x120]
push esi
push eax
mov byte [edi], bl
call sub.MSVCRT.dll_strcat
inc edi
lea eax, [ebp - 0x120]
push edi
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
lea eax, [ebp - 0x120]
push esi
push eax
call sub.MSVCRT.dll_strcat
push 0x10093810
lea eax, [ebp - 0xc]
push eax
call sub.MSVCRT.dll_strcpy
add esp, 0x10
lea eax, [ebp - 0x428]
push eax
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x10003545
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
pop ecx
test eax, eax
pop ecx
jne 0x10003545
cmp dword [ebp + 8], ebx
jne 0x10003007
cmp dword [ebp + 0x10], ebx
je 0x10002ff2
push dword [ebp + 0x10]
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x10003007
push dword [ebp + 0x10]
jmp 0x10002ff9
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x324]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
lea eax, [ebp - 0x828]
push 0x10093808
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x828]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x828]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push 0x100937fc
push eax
call sub.MSVCRT.dll_strcat
mov esi, 0x100937f8
lea eax, [ebp - 0x828]
push esi
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push 0x100937f0
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x828]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push esi
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x40
lea eax, [ebp - 0x828]
push 0x10093740
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push esi
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push 0x10093700
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push esi
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push 0x100936e8
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push esi
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push 0x100936d4
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push esi
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x40
lea eax, [ebp - 0x828]
push 0x100936a8
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push esi
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push 0x1009369c
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push esi
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x828]
push esi
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x28
lea eax, [ebp - 0x15b8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x10003180
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x1bc
jmp 0x1000354e
mov esi, dword [sym.imp.WS2_32.dll_inet_addr]
lea eax, [ebp - 0x220]
push eax
call esi
cmp eax, 0xffffffff
je 0x100031be
lea eax, [ebp - 0xc]
mov word [ebp - 0x1c], 2
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
pop ecx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1a], ax
lea eax, [ebp - 0x220]
push eax
call esi
mov dword [ebp - 0x18], eax
jmp 0x10003211
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
cmp esi, ebx
jne 0x100031df
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x1f3
jmp 0x10003530
lea eax, [ebp - 0xc]
mov word [ebp - 0x1c], 2
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
pop ecx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1a], ax
movsx eax, word [esi + 0xa]
push eax
mov eax, dword [esi + 0xc]
push dword [eax]
lea eax, [ebp - 0x18]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push ebx
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp + 0x10], esi
jne 0x10003240
mov eax, dword [ebp + 0x1c]
push 0x10093628
mov dword [eax], 0x190
call dword [sym.imp.MSVCRT.dll_printf]
pop ecx
jmp 0x10003530
lea eax, [ebp - 0x20]
push 4
push eax
push 0x1006
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [ebp - 0x1c]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x10003276
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x191
jmp 0x10003527
lea eax, [ebp - 0x828]
push ebx
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x828]
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x100032a6
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x193
jmp 0x10003527
mov edi, dword [sym.imp.WS2_32.dll_recv]
mov byte [ebp - 1], bl
xor esi, esi
mov dword [ebp + 0xc], ebx
cmp esi, 0x400
jge 0x10003315
push ebx
lea eax, [ebp - 1]
push 1
push eax
push dword [ebp + 0x10]
call edi
cmp eax, 0xffffffff
je 0x10003527
mov al, byte [ebp - 1]
mov byte [ebp + esi - 0x1028], al
inc esi
cmp esi, 4
jl 0x10003310
cmp byte [ebp + esi - 0x102c], 0xd
jne 0x10003310
cmp byte [ebp + esi - 0x102b], 0xa
jne 0x10003310
cmp byte [ebp + esi - 0x102a], 0xd
jne 0x10003310
cmp byte [ebp + esi - 0x1029], 0xa
jne 0x10003310
mov dword [ebp + 0xc], 1
cmp dword [ebp + 0xc], ebx
je 0x100032b4
mov esi, dword [sym.imp.MSVCRT.dll_strstr]
lea eax, [ebp - 0x1028]
push 0x10093690
push eax
call esi
pop ecx
test eax, eax
pop ecx
je 0x1000333d
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x194
jmp 0x10003527
lea eax, [ebp - 0x1028]
push 0x10093684
push eax
call esi
pop ecx
test eax, eax
pop ecx
je 0x1000335f
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x12c
jmp 0x10003527
lea eax, [ebp - 0x1028]
push 0x10093678
push eax
call esi
pop ecx
test eax, eax
pop ecx
je 0x10003381
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x1f4
jmp 0x10003527
mov esi, 0x10093668
lea eax, [ebp - 0x1028]
push esi
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp + 0xc], eax
je 0x1000353a
push esi
call sub.MSVCRT.dll_strlen
add eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
cmp dword [ebp + 8], 1
pop ecx
mov esi, eax
pop ecx
mov dword [ebp + 0xc], esi
jne 0x100033d5
cmp esi, dword [ebp + 0x18]
jbe 0x100034f9
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x195
jmp 0x10003527
cmp dword [ebp + 8], 2
jne 0x100033e5
mov eax, dword [ebp + 0x1c]
mov dword [eax], esi
jmp 0x10003524
cmp dword [ebp + 8], ebx
jne 0x10003524
lea eax, [ebp - 0x324]
push 0x100935b0
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp + 8], eax
jne 0x10003417
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x198
jmp 0x100034e8
cmp esi, ebx
mov dword [ebp + 0x1c], ebx
jbe 0x100034c5
mov esi, 0x400
lea eax, [ebp - 0x1428]
push esi
push ebx
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [ebp + 0xc]
add esp, 0xc
sub eax, dword [ebp + 0x1c]
push ebx
cmp eax, esi
jbe 0x10003482
lea eax, [ebp - 0x1428]
push esi
push eax
push dword [ebp + 0x10]
call edi
cmp eax, 0xffffffff
mov dword [ebp + 0x14], eax
je 0x100034d1
cmp eax, ebx
je 0x100034d1
cmp eax, esi
ja 0x100034d1
push dword [ebp + 8]
push eax
lea eax, [ebp - 0x1428]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ecx, dword [ebp + 0x14]
add esp, 0x10
cmp eax, ecx
jne 0x100034d1
add dword [ebp + 0x1c], ecx
jmp 0x100034b9
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp + 0x1c]
push eax
lea eax, [ebp - 0x1428]
push eax
push dword [ebp + 0x10]
call edi
push dword [ebp + 8]
mov esi, eax
cmp esi, 0xffffffff
je 0x100034d4
push esi
lea eax, [ebp - 0x1428]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, esi
jne 0x100034d1
add dword [ebp + 0x1c], esi
mov eax, dword [ebp + 0x1c]
cmp eax, dword [ebp + 0xc]
jb 0x10003422
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
jmp 0x10003524
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
lea eax, [ebp - 0x324]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp + 0x10]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x1000354e
cmp esi, ebx
mov dword [ebp + 0x1c], ebx
jbe 0x10003524
push 4
push ebx
push dword [ebp + 0x14]
call sub.MSVCRT.dll_memset
add esp, 0xc
push ebx
push 0x400
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call edi
add dword [ebp + 0x1c], eax
cmp dword [ebp + 0x1c], esi
jb 0x10003500
push 1
pop ebx
push dword [ebp + 0x10]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, ebx
jmp 0x10003550
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x196
jmp 0x10003527
mov eax, dword [ebp + 0x1c]
mov dword [eax], 0x1f5
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret