Function at 0x405813
Capabilities:
Initialize winsock library
Send data
Send data on socket

Disassembly:
sub esp, 0x19c
mov eax, dword [0x446b80]
xor eax, esp
mov dword [esp + 0x198], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x1ac]
xor ebx, ebx
push edi
mov edi, 0x708
mov dword [0x460c9c], ebx
push edi
push ebx
push 0x449878
call fcn.0040c0d0
push edi
push ebx
push 0x449f80
call fcn.0040c0d0
push ebx
call fcn.00409633
mov ebp, 0x1b000
mov edi, eax
push ebp
mov ebx, edx
call fcn.0040e03c
push ebp
xor ebp, ebp
mov dword [0x460c8c], eax
push ebp
push eax
call fcn.0040c0d0
push esi
call fcn.00408b0f
add esp, 0x30
test eax, eax
jns 0x405890
or eax, 0xffffffff
jmp 0x405aad
imul eax, dword [0x460c98], 0xd8
push eax
push dword [0x460c8c]
call fcn.0040ee38
push 0x405800
mov esi, 0xd8
mov dword [0x460c8c], eax
push esi
push dword [0x460c98]
push eax
call fcn.0040eef0
mov ecx, dword [0x460c98]
add esp, 0x18
mov eax, dword [0x460c8c]
mov edx, ebp
test ecx, ecx
je 0x4058ee
add eax, 0x38
mov dword [eax + 0xc], ebp
mov dword [eax], edi
mov dword [eax + 4], ebx
add eax, esi
mov ecx, dword [0x460c98]
inc edx
cmp edx, ecx
jb 0x4058d9
imul eax, ecx, 0x102
push eax
call fcn.0040e03c
pop ecx
mov dword [0x460c88], eax
lea eax, [esp + 0x18]
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
jne 0x405aad
mov eax, dword [esp + 0x18]
cmp al, 1
jne 0x405aa8
shr eax, 8
cmp al, 1
jne 0x405aa8
push ebp
push 2
pop esi
push esi
push esi
call sub.WSOCK32.dll_socket
mov dword [0x448f3c], eax
cmp eax, 0xffffffff
jne 0x40595d
push str.Socket_open_Fehler___n
call fcn.0040ed5c
add eax, 0x40
push eax
call fcn.004098a6
pop ecx
pop ecx
jmp 0x405888
movzx eax, word [0x460c9c]
push eax
mov word [0x449840], si
call sub.WSOCK32.dll_htons
push 0x10
push 0x449840
push dword [0x448f3c]
mov word [0x449842], ax
mov dword [0x449844], ebp
call sub.WSOCK32.dll_bind
test eax, eax
jns 0x4059b4
push dword [0x460c9c]
push str.Bind_Port__x_Fehler___n
call fcn.0040ed5c
add eax, 0x40
push eax
call fcn.004098a6
add esp, 0xc
jmp 0x405888
movzx eax, word [0x460c9c]
push eax
mov word [0x449850], si
call sub.WSOCK32.dll_htons
push ebp
mov word [0x449852], ax
mov dword [0x449874], ebp
call sub.WSOCK32.dll_htons
push 3
pop ebx
push ebx
mov word [0x448f40], ax
mov dword [0x449874], ebx
call sub.WSOCK32.dll_htons
mov edi, dword [0x460c8c]
mov esi, ebp
mov word [0x448f42], ax
cmp dword [0x460c98], esi
jbe 0x405a3e
push 4
push edi
push 0x449854
call fcn.0040ba80
add esp, 0xc
push 0x10
push 0x449850
push ebp
push 4
push 0x448f40
push dword [0x448f3c]
call sub.WSOCK32.dll_sendto
add edi, 0xd8
inc esi
cmp esi, dword [0x460c98]
jb 0x405a05
push ebp
call fcn.00409633
push ebp
mov esi, eax
mov edi, edx
call fcn.00409633
sub eax, esi
pop ecx
sbb edx, edi
pop ecx
cmp edx, ebp
jg 0x405aa1
jge 0x405a9c
push ebp
call fcn.00405ca3
mov edx, dword [0x460c98]
mov eax, ebp
pop ecx
mov ecx, dword [0x460c8c]
test edx, edx
je 0x405a85
add ecx, 0x44
cmp dword [ecx], ebx
jl 0x405a85
add ecx, 0xd8
inc eax
cmp eax, edx
jb 0x405a76
cmp eax, edx
je 0x405aa1
push ebp
call fcn.00409633
sub eax, esi
pop ecx
sbb edx, edi
mov dword [esp + 0x14], edx
js 0x405a5a
jg 0x405aa1
cmp eax, 0x5a
jb 0x405a5a
mov eax, dword [0x448f3c]
jmp 0x405aad
call sub.WSOCK32.dll_WSACleanup
mov ecx, dword [esp + 0x1a8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040a6e0
add esp, 0x19c
ret