Function at 0x40d280
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0xcc
mov eax, dword [0x4a337c]
xor eax, esp
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0xd4]
push ebp
push esi
xor ebp, ebp
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0xe8]
lea esi, [esp + 0x80]
push edi
mov edi, dword [esp + 0xdc]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x20], esi
mov byte [esp + 0xf], 0
test edi, edi
je 0x40d963
cmp dword [edi], 0xbab1e
jne 0x40d963
cmp byte [edi + 0xeb], 0
je 0x40d30a
pop edi
pop esi
lea eax, [ebp + 8]
pop ebp
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.0045aab3
add esp, 0xcc
ret
mov eax, dword [esp + 0xe8]
mov dword [esp + 0x34], eax
test eax, eax
jns 0x40d336
pop edi
pop esi
mov eax, 0xa
pop ebp
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.0045aab3
add esp, 0xcc
ret
push ebx
mov ebx, dword [edi + 4]
test ebx, ebx
je 0x40d3a2
nop
lea eax, [esp + 0x74]
push eax
push ebx
call fcn.0040bb30
add esp, 8
mov edi, eax
xor edx, edx
mov eax, 1
or esi, 0xffffffff
test edi, eax
je 0x40d36a
mov ecx, dword [esp + edx*4 + 0x74]
cmp ecx, 0xffffffff
jae 0x40d36a
inc ebp
mov esi, ecx
mov ecx, eax
rol ecx, 0x10
test edi, ecx
je 0x40d37f
mov ecx, dword [esp + edx*4 + 0x74]
cmp ecx, 0xffffffff
jae 0x40d37f
inc ebp
mov esi, ecx
cmp esi, 0xffffffff
je 0x40d38c
inc edx
rol eax, 1
cmp edx, 5
jb 0x40d357
mov ebx, dword [ebx + 4]
mov dword [esp + 0x40], ebp
test ebx, ebx
jne 0x40d340
mov edi, dword [esp + 0x20]
lea esi, [esp + 0x88]
lea eax, [esp + 0x18]
push eax
push edi
call fcn.0040d170
mov eax, dword [esp + 0x20]
add esp, 8
test eax, eax
js 0x40d3c5
mov ecx, dword [esp + 0x38]
cmp eax, ecx
cmovl ecx, eax
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0xe8]
add eax, ebp
cmp byte [esp + 0xf8], 0
lea ecx, [eax + 1]
cmove ecx, eax
cmp ecx, 0xa
jbe 0x40d41d
lea eax, [ecx*8]
push eax
call dword [section..data]
mov esi, eax
add esp, 4
mov dword [esp + 0x24], esi
test esi, esi
jne 0x40d418
lea eax, [esi + 3]
pop ebx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.0045aab3
add esp, 0xcc
ret
mov byte [esp + 0x13], 1
mov eax, dword [sym.imp.WS2_32.dll_WSAEventSelect]
xor edx, edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x34], eax
test ebp, ebp
je 0x40d549
mov eax, dword [edi + 4]
mov dword [esp + 0x14], eax
test eax, eax
je 0x40d549
lea ecx, [esp + 0x74]
push ecx
push eax
call fcn.0040bb30
add esp, 8
mov dword [esp + 0x28], eax
xor edi, edi
mov edx, 1
mov ecx, edi
shl edx, cl
or esi, 0xffffffff
xor ebx, ebx
test eax, edx
mov edx, dword [esp + 0x1c]
je 0x40d493
mov eax, dword [esp + edi*4 + 0x74]
cmp eax, 0xffffffff
jae 0x40d493
mov esi, eax
mov ecx, 0x300
mov eax, dword [esp + 0x24]
mov ebx, 0x29
mov dword [eax + edx*8], esi
mov word [eax + edx*8 + 4], cx
inc edx
mov dword [esp + 0x1c], edx
lea ecx, [edi + 0x10]
mov eax, 1
shl eax, cl
test dword [esp + 0x28], eax
je 0x40d503
mov eax, dword [esp + edi*4 + 0x74]
cmp eax, 0xffffffff
jae 0x40d503
mov esi, eax
mov dword [esp + 0x18], 4
lea eax, [esp + 0x18]
or ebx, 0x32
push eax
lea eax, [esp + 0x30]
push eax
push 0x1008
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x40d4e9
cmp dword [esp + 0x2c], 1
jne 0x40d4e9
push eax
push eax
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
mov edx, dword [esp + 0x1c]
mov ecx, 0x10
mov eax, dword [esp + 0x24]
mov dword [eax + edx*8], esi
mov word [eax + edx*8 + 4], cx
inc edx
mov dword [esp + 0x1c], edx
cmp esi, 0xffffffff
je 0x40d532
mov eax, dword [esp + 0x20]
push ebx
push dword [eax + 0xe4]
push esi
call dword [esp + 0x40]
test eax, eax
jne 0x40d75c
mov eax, dword [esp + 0x28]
inc edi
cmp edi, 5
jb 0x40d457
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40d443
mov esi, dword [esp + 0x24]
cmp dword [esp + 0xe8], 0
mov dword [esp + 0x14], 0
jbe 0x40d65f
lea edi, [esi + 4]
mov esi, dword [esp + 0x3c]
lea edi, [edi + edx*8]
add esi, 4
nop dword [eax]
movzx edx, word [esi]
mov al, dl
and al, 1
movzx ecx, al
mov al, dl
neg ecx
sbb ecx, ecx
and ecx, 0x29
mov ebx, ecx
or ebx, 4
and al, 2
cmove ebx, ecx
test dl, 4
je 0x40d5d7
mov eax, dword [esi - 4]
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], eax
push ecx
push 0x1008
push 0xffff
push eax
or ebx, 0x32
mov dword [esp + 0x40], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x40d5d7
cmp dword [esp + 0x18], 1
jne 0x40d5d7
push eax
push eax
push eax
push dword [esp + 0x34]
call dword [sym.imp.WS2_32.dll_send]
mov eax, dword [esp + 0x20]
push ebx
push dword [eax + 0xe4]
push dword [esi - 4]
call dword [esp + 0x40]
test eax, eax
jne 0x40d75c
mov eax, dword [esi - 4]
xor ecx, ecx
mov dword [edi - 4], eax
xor eax, eax
mov word [edi], ax
movzx eax, word [esi]
mov edx, eax
test al, 1
je 0x40d614
mov eax, 0x300
mov word [edi], ax
mov ecx, eax
movzx edx, word [esi]
movzx eax, dx
movzx edx, cx
mov ebx, eax
test al, 2
je 0x40d62f
or ecx, 0x400
mov word [edi], cx
movzx ebx, word [esi]
movzx edx, cx
test bl, 4
je 0x40d63a
or edx, 0x10
mov word [edi], dx
mov eax, dword [esp + 0x14]
add edi, 8
mov edx, dword [esp + 0x1c]
inc eax
inc edx
mov dword [esp + 0x14], eax
add esi, 8
mov dword [esp + 0x1c], edx
cmp eax, dword [esp + 0xe8]
jb 0x40d570
test edx, edx
jne 0x40d77a
cmp byte [esp + 0xf8], dl
je 0x40d8cf
mov esi, dword [esp + 0x24]
xor ebx, ebx
mov dword [esp + 0x28], ebx
mov eax, dword [esp + 0x20]
push 0
push dword [esp + 0x3c]
add eax, 0xe4
push 0
push eax
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov ecx, dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
xor edi, edi
mov dword [esp + 0x18], ecx
cmp dword [esp + 0xe8], edi
jbe 0x40d81f
lea eax, [ebp*8 + 6]
add eax, esi
mov dword [esp + 0x2c], eax
mov ebp, eax
movsx eax, word [ebp]
lea edx, [esp + 0x48]
mov dword [esp + 0x14], eax
xor esi, esi
mov eax, dword [esp + 0x3c]
push edx
push esi
mov dword [esp + 0x50], esi
mov eax, dword [eax + edi*8]
push eax
mov dword [esp + 0x38], eax
call ecx
test eax, eax
jne 0x40d73c
mov ecx, dword [esp + 0x48]
mov eax, esi
test cl, 0x29
mov ebx, ecx
setne al
movzx edx, ax
mov eax, edx
or eax, 4
and bl, 0x32
mov ebx, dword [esp + 0x48]
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
and bl, 4
mov ebx, dword [esp + 0x28]
movzx ecx, ax
mov eax, edx
cmove ecx, eax
cmp dword [esp + 0x44], 0
movzx eax, cx
mov esi, eax
je 0x40d73c
test ebx, ebx
jne 0x40d73c
cmp dword [esp + 0x48], ebx
je 0x40d73c
inc dword [esp + 0x30]
mov eax, dword [esp + 0x20]
push 0
push dword [eax + 0xe4]
push dword [esp + 0x34]
call dword [esp + 0x40]
test ebx, ebx
jne 0x40d7af
movzx eax, si
jmp 0x40d7fd
cmp byte [esp + 0x13], 0
je 0x40d770
push dword [esp + 0x24]
call dword [0x4a3004]
add esp, 4
mov eax, 4
jmp 0x40d3ff
mov esi, dword [esp + 0x24]
push 0
push 0
push edx
push esi
call fcn.0042a110
mov ebx, eax
add esp, 0x10
mov dword [esp + 0x28], ebx
test ebx, ebx
jns 0x40d7a0
mov eax, 0xc
jmp 0x40d3ff
jle 0x40d67e
mov dword [esp + 0x30], ebx
jmp 0x40d698
mov edx, dword [esp + 0x14]
mov eax, esi
or eax, 1
and edx, 0x300
movzx ecx, ax
movzx eax, si
mov esi, dword [esp + 0x14]
cmove ecx, eax
movzx edx, cx
mov ebx, esi
mov eax, edx
or eax, 4
and bl, 0x10
mov ebx, dword [esp + 0x28]
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
and esi, 0x400
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx eax, cx
mov ecx, dword [esp + 0x3c]
add ebp, 8
mov word [ecx + edi*8 + 6], ax
inc edi
mov ecx, dword [esp + 0x18]
cmp edi, dword [esp + 0xe8]
jb 0x40d6c0
mov ebp, dword [esp + 0x40]
test ebp, ebp
je 0x40d8bd
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
test eax, eax
je 0x40d8bd
nop word [eax + eax]
lea ecx, [esp + 0x74]
push ecx
push eax
call fcn.0040bb30
add esp, 8
mov ebp, eax
xor esi, esi
mov edi, 1
lea ecx, [esi + 0x10]
mov edx, edi
bts edx, ecx
test ebp, edx
je 0x40d8ae
lea eax, [esp + 0x48]
mov dword [esp + 0x48], 0
push eax
push 0
push dword [esp + esi*4 + 0x7c]
call dword [esp + 0x24]
test eax, eax
jne 0x40d892
cmp dword [esp + 0x44], eax
je 0x40d892
test ebx, ebx
jne 0x40d892
cmp dword [esp + 0x48], ebx
je 0x40d892
inc dword [esp + 0x30]
mov eax, dword [esp + 0x20]
push 0
push dword [eax + 0xe4]
push dword [esp + esi*4 + 0x7c]
call dword [esp + 0x40]
inc esi
rol edi, 1
cmp esi, 5
jb 0x40d857
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40d840
mov ebx, dword [esp + 0x20]
push dword [ebx + 0xe4]
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
jmp 0x40d8d3
mov ebx, dword [esp + 0x20]
cmp byte [esp + 0x13], 0
je 0x40d8e7
push dword [esp + 0x24]
call dword [0x4a3004]
add esp, 4
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x40d8f5
mov eax, dword [esp + 0x30]
mov dword [ecx], eax
cmp byte [esp + 0xf4], 0
je 0x40d95c
cmp dword [esp + 0x1c], 0
jne 0x40d95c
cmp byte [esp + 0xf8], 0
jne 0x40d95c
cmp dword [ebx], 0xbab1e
mov dword [esp + 0x18], 0
jne 0x40d95c
cmp byte [ebx + 0xeb], 0
jne 0x40d95c
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.0040d170
add esp, 8
test eax, eax
jne 0x40d95c
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40d95c
mov ecx, dword [esp + 0x38]
cmp eax, ecx
jg 0x40d94f
test eax, eax
jns 0x40d951
mov eax, ecx
cdq
push edx
push eax
call fcn.0042a630
add esp, 8
xor eax, eax
jmp 0x40d3ff
mov ecx, dword [esp + 0xd4]
mov eax, 1
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0045aab3
add esp, 0xcc
ret