Function at 0x413590
Capabilities:
Get hostname
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x248
mov eax, dword [0x5ed284]
xor eax, esp
mov dword [esp + 0x244], eax
mov eax, dword [esp + 0x24c]
push ebx
mov ebx, dword [esp + 0x258]
push ebp
mov ebp, dword [esp + 0x258]
push esi
push edi
push 0x3f
lea ecx, [esp + 0x151]
push 0
mov edi, 1
push ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebx
mov esi, edi
mov byte [esp + 0x158], 0
call sub.VCRUNTIME140.dll_memset
push 0x63
lea edx, [esp + 0x19d]
push 0
push edx
mov byte [esp + 0x1a4], 0
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
test ebx, ebx
jne 0x413611
or eax, 0xffffffff
jmp 0x413747
mov byte [ebx], 0
call fcn.00402c70
cmp eax, edi
jne 0x41361f
xor esi, esi
call fcn.00402bf0
test eax, eax
je 0x41362a
mov esi, edi
push 0x64
lea eax, [esp + 0x1f4]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea ecx, [ebp + 2]
push ecx
lea edx, [esp + 0x200]
push 0x64
push edx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy_s
lea eax, [esp + 0x208]
push 0x5b1c60
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll__stricmp
add esp, 0x20
test eax, eax
jne 0x41367e
cmp esi, edi
jne 0x41367e
mov ecx, dword [esp + 0x14]
push ebx
push ecx
call fcn.00419f50
add esp, 8
jmp 0x413747
lea edx, [esp + 0x1f0]
push 0x5b1c60
push edx
call sub.api_ms_win_crt_string_l1_1_0.dll__stricmp
add esp, 8
test eax, eax
jne 0x4136e5
test esi, esi
jne 0x4136e5
mov ebx, 2
cmp word [ebp + 0x98], bx
push 0x64
jne 0x4136bd
lea eax, [esp + 0x190]
push eax
call fcn.00402a20
add esp, 8
jmp 0x413704
lea ecx, [esp + 0x190]
push ecx
call sub.WS2_32.dll_gethostname
cmp eax, 0xffffffff
jne 0x413704
push str.127.0.0.1
lea edx, [esp + 0x190]
push 0x64
push edx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy_s
jmp 0x413701
lea eax, [esp + 0x1f0]
push eax
lea ecx, [esp + 0x190]
push 0x64
push ecx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy_s
mov ebx, 2
add esp, 0xc
call fcn.004027a0
movzx ecx, word [ebp + 0x98]
add ecx, 0xffffffff
cmp ecx, 7
ja case.0x413718.2
jmp dword [ecx*4 + 0x413d44]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
push edx
push ebp
push eax
call fcn.00412460
add esp, 0xc
jmp 0x413747
test al, 1
je 0x413742
mov dword [esp + 0x10], edi
jmp 0x413772
test bl, al
jne 0x41376e
mov eax, 0x4c
mov ecx, dword [esp + 0x254]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0052bfb9
add esp, 0x248
ret
test al, 1
je 0x41376a
mov dword [esp + 0x10], edi
jmp 0x413772
test bl, al
je 0x413742
mov dword [esp + 0x10], ebx
lea ecx, [esp + 0x18c]
push ecx
call fcn.00402800
add esp, 4
test eax, eax
jne 0x413790
test byte [esp + 0x10], bl
je 0x413790
mov dword [esp + 0x10], ebx
cmp word [ebp + 0x98], di
mov eax, dword [0x5efb70]
je 0x4137a3
mov eax, dword [0x5efb74]
cmp eax, 0xffffffff
jne 0x4137dd
cmp dword [esp + 0x10], ebx
jne 0x4137b8
push 0x3e8
push ebx
push 6
jmp 0x4137bc
push 0x11
push ebx
push ebx
call fcn.00403050
add esp, 0xc
cmp eax, 0xffffffff
jne 0x4137d3
mov eax, 0x3f
jmp 0x413747
push eax
push ebp
call fcn.004120f0
add esp, 8
cmp dword [esp + 0x10], ebx
push 0
jne 0x41380b
lea edx, [esp + 0x150]
push edx
lea eax, [esp + 0x194]
push eax
call fcn.00402980
add esp, 0xc
test eax, eax
je 0x41382d
mov eax, 0x3d
jmp 0x413747
push 0x40
lea ecx, [esp + 0x154]
push ecx
lea edx, [esp + 0x198]
push edx
call fcn.004026d0
add esp, 0x10
test eax, eax
jne 0x413938
cmp dword [0x5efb64], 0
je 0x41384d
push 0x813b34
call fcn.00414940
add esp, 4
mov dword [0x5efb64], 0
call fcn.00402050
cmp dword [0x813b34], 0
mov dword [0x813b44], eax
je 0x4138b6
mov esi, dword [sym.imp.KERNEL32.dll_GetVersion]
call esi
cmp eax, 0x80000000
jb 0x4138b6
call esi
cmp eax, 0x80000000
jb 0x41387e
call esi
cmp al, 4
jb 0x4138b6
cmp dword [esp + 0x10], ebx
jne 0x4138b6
push ebp
call fcn.004120d0
add esp, 4
push eax
call sub.WS2_32.dll_closesocket
push 0x3e8
push ebx
push 6
call fcn.00403050
add esp, 0xc
cmp eax, 0xffffffff
je 0x4137c9
push eax
push ebp
call fcn.004120f0
add esp, 8
mov eax, dword [0x813b34]
lea ebx, [esp + 0x14c]
call fcn.004123c0
mov edi, eax
test edi, edi
jne 0x4139b5
push 0x58
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov edi, eax
add esp, 4
test edi, edi
jne 0x4138e9
lea eax, [edi + 0x40]
jmp 0x413747
mov ecx, 2
xor eax, eax
cmp dword [esp + 0x10], ecx
jne 0x413942
lea esi, [edi + 8]
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov word [esi], 6
movzx eax, word [0x5efb60]
push eax
call fcn.00403180
lea ecx, [esp + 0x150]
push esi
push ecx
mov word [esi + 0xc], ax
call fcn.004028d0
add esp, 0xc
test eax, eax
jne 0x41398e
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
mov eax, 0x3d
jmp 0x413747
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], eax
mov word [edi + 8], cx
movzx edx, word [0x5efb60]
push edx
call fcn.00403180
mov word [edi + 0xa], ax
lea eax, [esp + 0x150]
push eax
call fcn.00403000
add esp, 8
cmp eax, 0xffffffff
mov dword [edi + 0xc], eax
jne 0x41398e
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
mov eax, 0x3d
jmp 0x413747
lea ecx, [esp + 0x14c]
push ecx
lea edx, [edi + 0x18]
push 0x40
push edx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy_s
push edi
push 0x813b34
mov dword [edi], 1
call fcn.00414950
add esp, 0x14
mov esi, dword [esp + 0x14]
mov dword [0x813b38], 0x2c6
mov eax, dword [edi]
and eax, 0x1fff
mov dword [0x813b3c], eax
mov eax, esi
mov dword [0x813b40], 0
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4139e0
sub eax, edx
add eax, 1
cmp eax, 0x3e8
ja 0x413a04
push eax
push esi
push 0x813b48
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
push 0x3f8
push 0
push 0x813f30
call sub.VCRUNTIME140.dll_memset
push 0x3f8
push 0
push 0x813738
mov dword [esp + 0x44], 4
mov dword [esp + 0x48], 5
mov dword [esp + 0x4c], 6
mov dword [esp + 0x2c], 0
mov ebx, 1
call sub.VCRUNTIME140.dll_memset
mov ecx, dword [0x813b38]
push ecx
call fcn.004031b0
mov edx, dword [0x813b3c]
push edx
mov dword [0x813738], eax
call fcn.004031b0
mov dword [0x81373c], eax
mov eax, dword [0x813b40]
push eax
call fcn.004031b0
mov ecx, dword [0x813b44]
push ecx
mov dword [0x813740], eax
call fcn.004031b0
push 0x813b48
push 0x3e8
push 0x813748
mov dword [0x813744], eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy_s
add esp, 0x34
jmp 0x413ab0
mov esi, dword [esp + 0x10]
cmp dword [esp + 0x14], 3
jge 0x413d38
cmp esi, 2
jne 0x413aff
test ebx, ebx
je 0x413b2e
push 0x10
lea edx, [edi + 8]
push edx
push 0
push 0x3f8
push 0x813738
push ebp
call fcn.004120d0
add esp, 4
push eax
call sub.WS2_32.dll_sendto
cmp eax, 0x3f8
je 0x413b2e
call sub.WS2_32.dll_WSAGetLastError
mov eax, 0x3e
jmp 0x413747
test ebx, ebx
je 0x413b2e
push 0x10
lea eax, [edi + 8]
push eax
push 0
push 0x3f8
push 0x813738
push ebp
call fcn.004120d0
add esp, 4
push eax
call fcn.00403100
add esp, 0x18
cmp eax, 0x3f8
jne 0x413af5
push ebp
xor ebx, ebx
call fcn.004120d0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + ecx*4 + 0x30]
lea ecx, [esp + 0x28]
push ecx
push ebx
mov dword [esp + 0x30], edx
push ebx
lea edx, [esp + 0x48]
mov dword [esp + 0x4c], eax
push edx
add eax, 1
push eax
mov dword [esp + 0x50], 1
mov dword [esp + 0x40], ebx
call fcn.00403080
add esp, 0x18
cmp eax, 0xffffffff
je 0x413d2e
test eax, eax
je 0x413d20
push 0x3f8
push ebx
push 0x813738
mov dword [esp + 0x2c], 0x10
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp esi, 2
jne 0x413bc6
push ebx
push 0x3f8
push 0x813738
push ebp
call fcn.004120d0
add esp, 4
push eax
call sub.WS2_32.dll_recv
cmp eax, 0x3f8
je 0x413bf6
mov eax, 0x6c
jmp 0x413747
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x140]
push ecx
push 0
push 0x3f8
push 0x813738
push ebp
call fcn.004120d0
add esp, 4
push eax
call fcn.00403140
add esp, 0x18
cmp eax, 0xffffffff
je 0x413bbc
mov edx, dword [0x813738]
push edx
call fcn.004031b0
mov dword [0x813f30], eax
mov eax, dword [0x81373c]
push eax
call fcn.004031b0
mov ecx, dword [0x813740]
push ecx
mov dword [0x813f34], eax
call fcn.004031b0
mov edx, dword [0x813744]
push edx
mov dword [0x813f38], eax
call fcn.004031b0
push 0x813748
push 0x3e8
push 0x813f40
mov dword [0x813f3c], eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy_s
add esp, 0x1c
cmp esi, 1
jne 0x413ced
lea eax, [esi + 3]
lea ecx, [esp + 0x140]
lea edx, [edi + 0xc]
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x413c7e
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x413c66
test eax, eax
je 0x413ce3
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x413ccd
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x413cdf
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x413ccd
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x413cdf
movzx esi, byte [edx]
movzx ebp, byte [ecx]
sub esi, ebp
jne 0x413ccd
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x413cdf
movzx esi, byte [edx]
movzx eax, byte [ecx]
sub esi, eax
je 0x413cdf
test esi, esi
mov ebp, dword [esp + 0x18]
mov eax, 1
jg 0x413ce5
or eax, 0xffffffff
jmp 0x413ce5
mov ebp, dword [esp + 0x18]
xor eax, eax
test eax, eax
jne 0x413ab0
mov ecx, dword [0x813f34]
cmp ecx, dword [0x813b3c]
jne 0x413ab0
mov edx, dword [esp + 0x1c]
add dword [edi], 1
push 0x813f40
push 0x3e8
push edx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy_s
add esp, 0xc
xor eax, eax
jmp 0x413747
mov ebx, 1
add dword [esp + 0x14], ebx
jmp 0x413ab4
mov eax, 0x6d
jmp 0x413747
mov eax, 0x3c
jmp 0x413747