Function at 0x507850
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x242c
call fcn.005d9990
mov eax, dword [ebp + 8]
push ebx
mov ecx, eax
shr ecx, 0x10
test ecx, ecx
push esi
push edi
jne case.0x5079c8.101
cmp eax, 0x20
je case.0x5079c8.101
cmp dword [0x61a3bc], 0xffffffff
je 0x5085c7
call fcn.00508b70
test eax, eax
mov dword [esp + 0x18], eax
je case.0x5079c8.101
push 0
push 0x432
push 0x67ab38
call fcn.00423310
mov edx, dword [0x61a3bc]
add esp, 8
push eax
push 0x67ab38
push edx
call dword [sym.imp.WSOCK32.dll_recv]
cmp eax, 0xffffffff
je case.0x5079c8.101
cmp eax, 1
jle case.0x5079c8.101
mov ecx, dword [0x61a3bc]
push 0
mov byte [eax + 0x67ab38], 0
mov eax, dword [0x6a0f40]
push 0
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
push 0x67ab38
mov dword [0x679ac4], 0
call fcn.005076e0
add esp, 4
test eax, eax
je case.0x5079c8.101
cmp byte [0x67ab38], 0x20
mov esi, 0x67ab38
jne 0x507928
mov edi, edi
mov al, byte [esi + 1]
inc esi
cmp al, 0x20
je 0x507920
cmp byte [esi], 0
je case.0x5079c8.101
push 0x20
push esi
call fcn.005d9b20
add esp, 8
test eax, eax
je case.0x5079c8.101
lea edi, [eax + 1]
mov byte [eax], 0
cmp byte [edi], 0x20
mov ebx, esi
mov dword [esp + 0x10], edi
jne 0x507961
mov al, byte [edi + 1]
inc edi
cmp al, 0x20
je 0x507955
mov dword [esp + 0x10], edi
cmp byte [edi], 0
je case.0x5079c8.101
push 0x20
push edi
call fcn.005d9b20
mov esi, eax
add esp, 8
test esi, esi
je 0x507995
mov byte [esi], 0
mov al, byte [esi + 1]
inc esi
cmp al, 0x20
jne 0x50798e
mov al, byte [esi + 1]
inc esi
cmp al, 0x20
je 0x507986
cmp byte [esi], 0
jne 0x507995
xor esi, esi
push edi
call fcn.00507720
add esp, 4
test eax, eax
je case.0x5079c8.101
push ebx
call fcn.005d9a55
mov ebx, eax
lea eax, [ebx - 0x64]
add esp, 4
cmp eax, 0x1e
mov dword [esp + 0x20], ebx
ja case.0x5079c8.101
movzx edx, byte [eax + 0x508608]
jmp dword [edx*4 + 0x5085f8]
cmp dword [0x63ce50], 2
je 0x507cce
mov eax, dword [0x61a3ac]
test eax, eax
jne 0x5079ee
cmp ebx, 0x64
je 0x507cce
mov eax, dword [0x61a3b0]
test eax, eax
jne 0x507a00
cmp ebx, 0x6e
je 0x507cce
cmp ebx, 0x64
jne 0x507a64
test byte [0x673f54], 0x20
jne 0x507cce
mov esi, dword [0x634560]
xor edi, edi
test esi, esi
je 0x507aba
mov eax, dword [esi + 0x1408]
test eax, eax
je 0x507a58
mov eax, dword [esi + 0x1428]
test eax, eax
jne 0x507a58
lea eax, [esi + 0x12d4]
push 0x67af70
push eax
call fcn.005f1860
add esp, 8
test eax, eax
jne 0x507a58
inc edi
cmp edi, 3
jg 0x507cce
mov esi, dword [esi + 0x2104]
test esi, esi
jne 0x507a22
jmp 0x507aba
cmp ebx, 0x6e
jne 0x507aba
test byte [0x673f54], 0x10
jne 0x507cce
mov esi, dword [0x634560]
test esi, esi
je 0x507aba
mov eax, dword [esi + 0x1408]
test eax, eax
je 0x507ab0
mov eax, dword [esi + 0x1428]
test eax, eax
je 0x507ab0
lea ecx, [esi + 0x12d4]
push 0x67af70
push ecx
call fcn.005f1860
add esp, 8
test eax, eax
je 0x507cce
mov esi, dword [esi + 0x2104]
test esi, esi
jne 0x507a80
mov eax, dword [0x66c1ec]
test eax, eax
je 0x507b42
mov edx, dword [esp + 0x10]
push 0x67af70
push edx
push str._s_id__s
push 0x679ad0
call fcn.005d9929
push 0x679ad0
call fcn.005f2394
push 0
push 0
push 0x5f4e90
push 0x679ad0
call fcn.004ccde0
add esp, 0x24
test eax, eax
je 0x507b42
mov eax, dword [str.151_rejected_n]
mov edx, dword [0x5f6504]
mov ecx, dword [0x5f6500]
mov dword [0x67ab38], eax
mov ax, word [0x5f6508]
mov word [0x67ab44], ax
mov eax, 0x67ab38
mov dword [0x67ab40], edx
mov dword [0x67ab3c], ecx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x507b36
jmp 0x507f79
cmp ebx, 0x6e
jne 0x507b6b
mov al, byte [0x63ce68]
test al, al
je 0x507cce
push 2
push 0x63ce68
call fcn.00424420
add esp, 8
test eax, eax
je 0x507cce
call fcn.004346d0
mov esi, eax
test esi, esi
je 0x507cce
mov edx, dword [esp + 0x10]
push edx
lea eax, [esi + 0x1070]
push 0x132
push eax
call fcn.00425550
push 0x67af70
lea edi, [esi + 0x12d4]
push 0x132
push edi
call fcn.00425550
push edi
lea ecx, [esi + 0x11a2]
push 0x132
push ecx
call fcn.00425550
mov dx, word [0x61a3b4]
mov eax, dword [esp + 0x3c]
mov dword [esi + 0x2100], eax
mov word [esi + 0x1406], dx
mov dword [esi + 0x1408], 5
mov dword [esi + 0x141c], 3
mov dword [esi + 0x1420], ebx
mov ecx, dword [0x619da0]
mov eax, ecx
add esp, 0x24
cmp eax, 1
mov dword [esi + 0x20dc], ecx
jge 0x507c0c
mov dword [esi + 0x20dc], 1
jmp 0x507c1b
cmp eax, 0x14
jle 0x507c1b
mov dword [esi + 0x20dc], 0x14
push 0x63ce68
lea edi, [esi + 0x142c]
push 0x432
push edi
call fcn.00425550
push edi
call fcn.00423370
push edi
lea edx, [esi + 0x185e]
push 0x432
push edx
call fcn.00425550
push 0x63d2a0
lea eax, [esi + 0x1c90]
push 0x432
push eax
call fcn.00425550
add esp, 0x28
cmp ebx, 0x6e
jne 0x507c6e
mov eax, 1
jmp 0x507c70
xor eax, eax
mov dword [esi + 0x1410], eax
mov dword [esi + 0x1428], eax
mov eax, dword [0x68758c]
test eax, eax
je 0x507d1c
mov edx, dword [esp + 0x18]
xor eax, eax
mov ecx, 0x842
lea edi, [esp + 0x330]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x330]
push ecx
push eax
push eax
push 0xf
push str.DCCSERVER
push eax
push eax
push edx
mov dword [esp + 0x358], esi
call fcn.0053a710
add esp, 0x20
test eax, eax
jne 0x507d1c
push eax
push esi
call fcn.00434ac0
add esp, 8
mov eax, dword [str.150_unavailable_n]
mov ecx, dword [0x5fc434]
mov edx, dword [0x5fc438]
mov dword [0x67ab38], eax
mov eax, dword [0x5fc43c]
mov dword [0x67ab3c], ecx
mov cl, byte [0x5fc440]
mov dword [0x67ab44], eax
mov eax, 0x67ab38
mov dword [0x67ab40], edx
mov byte [0x67ab48], cl
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x507d10
jmp 0x5081a7
mov eax, dword [0x61a3bc]
mov dword [esi + 0x20fc], eax
mov dword [0x61a3bc], 0xffffffff
mov ecx, dword [esi + 0x20fc]
push ecx
call fcn.00598890
mov edx, dword [0x6a0f40]
add esp, 4
push 0
push 0
push 0x801e
push edx
jmp 0x5080e1
test esi, esi
je case.0x5079c8.101
push 0x20
push esi
call fcn.005d9b20
add esp, 8
test eax, eax
je case.0x5079c8.101
lea ebx, [eax + 1]
mov byte [eax], 0
cmp byte [ebx], 0x20
mov dword [esp + 0x10], esi
jne 0x507d88
nop
mov al, byte [ebx + 1]
inc ebx
cmp al, 0x20
je 0x507d80
cmp byte [ebx], 0
je case.0x5079c8.101
mov eax, dword [esp + 0x18]
push eax
push ebx
call fcn.005077c0
mov eax, dword [0x61a3a8]
add esp, 8
test eax, eax
je 0x507f32
cmp dword [0x63ce48], 2
je 0x507f32
test byte [0x673f54], 8
jne 0x507f32
mov eax, dword [0x698ee4]
test eax, eax
je 0x507df5
push 0x67af70
push edi
push str._s_id__s
push 0x679ad0
call fcn.005d9929
push 0x679ad0
call fcn.0057fa30
add esp, 0x14
test eax, eax
jne 0x507e59
mov eax, dword [0x61a1e8]
test eax, eax
je 0x507e13
push 0
push 0
push ebx
call fcn.004cdc00
add esp, 0xc
test eax, eax
jne 0x507f32
mov eax, dword [0x66c1ec]
test eax, eax
je 0x507e59
push 0x67af70
push edi
push str._s_id__s
push 0x679ad0
call fcn.005d9929
push 0x679ad0
call fcn.005f2394
push 0
push 0
push 0x5f4e90
push 0x679ad0
call fcn.004ccde0
add esp, 0x24
test eax, eax
jne 0x508067
call fcn.0049eca0
mov esi, eax
test esi, esi
je 0x507f32
push edi
lea ecx, [esi + 4]
push 0x132
push ecx
call fcn.00425550
push 0x67af70
lea edi, [esi + 0x268]
push 0x132
push edi
call fcn.00425550
push edi
lea edx, [esi + 0x136]
push 0x132
push edx
call fcn.00425550
mov ax, word [0x61a3b4]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x3c]
mov word [esi + 0x1048], ax
mov eax, 1
mov dword [esi + 0x1034], eax
mov dword [esi + 0x10e0], eax
mov eax, dword [esp + 0x34]
push eax
mov dword [esi + 0x10e4], ecx
mov dword [esi + 0x1124], edx
call fcn.005da144
fstp qword [esp + 0x20]
add esp, 0x20
call fcn.0051c330
fstp qword [esp + 0x28]
fld qword [esp + 0x28]
mov ecx, dword [esp + 0x28]
fcomp qword [0x5f56a0]
mov edx, dword [esp + 0x2c]
add esp, 8
mov dword [esi + 0x1068], ecx
mov dword [esi + 0x106c], edx
fnstsw ax
test ah, 5
jp 0x507f8f
mov dword [esi + 0x1068], 0
mov dword [esi + 0x106c], 0xbff00000
push 0
push esi
call fcn.0049f510
add esp, 8
mov eax, dword [0x5fc434]
mov edx, dword [str.150_unavailable_n]
mov ecx, dword [0x5fc438]
mov dword [0x67ab3c], eax
mov al, byte [0x5fc440]
mov dword [0x67ab38], edx
mov edx, dword [0x5fc43c]
mov byte [0x67ab48], al
mov eax, 0x67ab38
mov dword [0x67ab44], edx
mov dword [0x67ab40], ecx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x507f72
mov ecx, dword [0x61a3bc]
push 0
sub eax, edx
push eax
push 0x67ab38
push ecx
jmp 0x508597
mov edx, 0x679ad0
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x507f98
lea eax, [esp + 0x130]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x238]
push edx
lea eax, [esp + 0x38]
push eax
push 0x679ad0
call fcn.005da53c
lea ecx, [esp + 0x144]
push ecx
lea edx, [esp + 0x48]
push edx
lea edi, [esi + 0x7cc]
push 0x5f4a5c
push edi
call fcn.005d9929
push 0
push 0
lea eax, [esi + 0x39a]
push eax
push edi
call fcn.0048d300
push edi
call fcn.00424220
add esp, 0x38
test eax, eax
jne 0x507f27
mov eax, dword [0x68758c]
test eax, eax
je 0x5080ac
mov edx, dword [esp + 0x18]
xor eax, eax
mov ecx, 0x842
lea edi, [esp + 0x330]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x330]
push ecx
push eax
push eax
push 0xf
push str.DCCSERVER
push eax
push eax
push edx
mov dword [esp + 0x354], esi
call fcn.0053a710
add esp, 0x20
test eax, eax
je 0x507f27
mov eax, dword [esi + 0x1044]
test eax, eax
je 0x5080ac
push 0
push esi
call fcn.0049f510
add esp, 8
mov eax, dword [str.151_rejected_n]
mov edx, dword [0x5f6504]
mov ecx, dword [0x5f6500]
mov dword [0x67ab38], eax
mov ax, word [0x5f6508]
mov word [0x67ab44], ax
mov eax, 0x67ab38
mov dword [0x67ab40], edx
mov dword [0x67ab3c], ecx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5080a0
jmp 0x507f79
mov edx, dword [0x61a3bc]
mov dword [esi + 0x111c], edx
mov dword [0x61a3bc], 0xffffffff
mov eax, dword [esi + 0x111c]
push eax
call fcn.00598890
mov ecx, dword [0x6a0f40]
add esp, 4
push 0
push 0
push 0x8011
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
push 1
call fcn.00507420
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
je case.0x5079c8.101
cmp byte [esi], 0
je case.0x5079c8.101
mov edx, dword [esp + 0x18]
push edx
push esi
call fcn.005077c0
mov eax, dword [0x66c1ec]
add esp, 8
test eax, eax
je 0x5081bd
mov eax, dword [esp + 0x10]
push 0x67af70
push eax
push str._s_id__s
push 0x679ad0
call fcn.005d9929
push 0x679ad0
call fcn.005f2394
push 0
push 0
push 0x5f4e90
push 0x679ad0
call fcn.004ccde0
add esp, 0x24
test eax, eax
je 0x5081bd
mov ecx, dword [str.151_rejected_n]
mov eax, dword [0x5f6504]
mov edx, dword [0x5f6500]
mov dword [0x67ab38], ecx
mov cx, word [0x5f6508]
mov dword [0x67ab40], eax
mov eax, 0x67ab38
mov dword [0x67ab3c], edx
mov word [0x67ab44], cx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5081a0
push 0
sub eax, edx
mov edx, dword [0x61a3bc]
push eax
push 0x67ab38
push edx
jmp 0x508597
mov ecx, 0x679ad0
sub ecx, esi
mov al, byte [esi]
mov byte [esi + ecx], al
inc esi
test al, al
jne 0x5081c4
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x134]
push ecx
lea edx, [esp + 0x238]
push edx
lea eax, [esp + 0x38]
push eax
push 0x679ad0
call fcn.005da53c
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x148]
push edx
push 0x5f4a5c
push 0x679ad0
call fcn.005d9929
push 0x679ad0
call fcn.00424220
add esp, 0x28
test eax, eax
jne 0x508539
mov edi, dword [0x634560]
test edi, edi
je 0x508539
mov esi, 3
mov eax, dword [edi + 0x1428]
test eax, eax
je 0x508260
cmp dword [edi + 0x1408], esi
jne 0x508260
lea eax, [edi + 0x12d4]
push 0x67af70
push eax
call fcn.005f1860
add esp, 8
test eax, eax
je 0x50826f
mov edi, dword [edi + 0x2104]
test edi, edi
jne 0x508236
jmp 0x508539
push 0x679ad0
lea eax, [edi + 0x185e]
push eax
push 0x5fc428
push 0x67feb8
call fcn.005d9929
push 1
push 0x67feb8
call fcn.00424420
add esp, 0x18
test eax, eax
je 0x508539
mov esi, dword [0x68d418]
test esi, esi
mov dword [esp + 0x10], 0
je 0x5082ec
lea ebx, [edi + 0x12d4]
lea esp, [esp]
mov eax, dword [esi + 0xc04]
test eax, eax
jle 0x5082e2
lea ecx, [esi + 0x268]
push ebx
push ecx
call fcn.005f1860
add esp, 8
test eax, eax
jne 0x5082e2
inc dword [esp + 0x10]
mov esi, dword [esi + 0xd1c]
test esi, esi
jne 0x5082c0
mov edx, dword [esp + 0x10]
cmp edx, dword [edi + 0x20dc]
jge 0x508539
call fcn.005459f0
test eax, eax
jne 0x508539
mov eax, dword [edi + 0x2100]
push eax
call fcn.00508aa0
add esp, 4
test eax, eax
je 0x508539
call fcn.005456a0
mov esi, eax
test esi, esi
je 0x508539
lea ecx, [edi + 0x1070]
push ecx
lea edx, [esi + 4]
push 0x132
push edx
call fcn.00425550
lea eax, [edi + 0x12d4]
push eax
lea ecx, [esi + 0x268]
push 0x132
push ecx
call fcn.00425550
lea edx, [edi + 0x11a2]
push edx
lea eax, [esi + 0x136]
push 0x132
push eax
call fcn.00425550
lea eax, [edi + 0x185e]
push eax
lea ebx, [esi + 0x39a]
push 0x432
push ebx
call fcn.00425550
push 0x679ad0
lea eax, [esi + 0x7cc]
push 0x432
push eax
call fcn.00425550
push ebx
call fcn.004256e0
mov cx, word [0x61a3b4]
mov edx, dword [esp + 0x60]
mov eax, 1
mov dword [esi + 0xcb0], eax
mov dword [esi + 0xcf0], eax
mov dword [esi + 0xc04], eax
mov word [esi + 0xc20], cx
mov dword [esi + 0xcb4], 3
mov dword [esi + 0xcb8], edx
mov eax, dword [edi + 0x2100]
add esp, 0x40
mov dword [esi + 0xd18], eax
lea eax, [esi + 0x7cc]
push eax
push ebx
push 0x5f4a5c
push 0x679ad0
call fcn.005d9929
lea ecx, [esp + 0x28]
xor eax, eax
push ecx
push 0x679ad0
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
call fcn.00423730
add esp, 0x18
test eax, eax
je 0x50851a
fild qword [esp + 0x18]
fstp qword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov dword [esi + 0xc44], eax
mov dword [esi + 0xc40], edx
fild qword [esp + 0x18]
fstp qword [esp + 0x10]
fld qword [esp + 0x20]
fcomp qword [esp + 0x10]
fnstsw ax
test ah, 0x44
jp 0x50851a
fld qword [esi + 0xc40]
fcomp qword [0x5f56a0]
fnstsw ax
test ah, 5
jnp 0x50851a
mov ecx, dword [0x61a3bc]
mov dword [esi + 0xd14], ecx
mov dword [0x61a3bc], 0xffffffff
mov edx, dword [esi + 0xd14]
push edx
call fcn.00598890
push esi
call fcn.00545960
fstp qword [esp]
mov eax, dword [edi + 0x2100]
add eax, 0x2e66
push eax
push str.131__s__0.0Lf_n
push 0x679ad0
call fcn.005d9929
mov eax, 0x679ad0
add esp, 0x14
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5084d0
mov ecx, dword [esi + 0xd14]
push 0
sub eax, edx
push eax
push 0x679ad0
push ecx
call dword [sym.imp.WSOCK32.dll_send]
mov edx, dword [0x6a0f40]
mov eax, dword [esi + 0xd14]
push 0x21
push 0x8014
push edx
push eax
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
push 1
call fcn.00507420
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push esi
mov dword [esi + 0xc40], 0
mov dword [esi + 0xc44], 0xbff00000
call fcn.00546370
add esp, 8
mov edx, dword [0x5fc434]
mov ecx, dword [str.150_unavailable_n]
mov eax, dword [0x5fc438]
mov dword [0x67ab3c], edx
mov dl, byte [0x5fc440]
mov dword [0x67ab38], ecx
mov ecx, dword [0x5fc43c]
mov dword [0x67ab40], eax
mov eax, 0x67ab38
mov byte [0x67ab48], dl
mov dword [0x67ab44], ecx
lea edx, [eax + 1]
jmp 0x508580
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x508580
push 0
sub eax, edx
push eax
mov eax, dword [0x61a3bc]
push 0x67ab38
push eax
call dword [sym.imp.WSOCK32.dll_send]
mov eax, dword [0x61a3bc]
cmp eax, 0xffffffff
je 0x5085c7
push 1
push eax
call dword [sym.imp.WSOCK32.dll_shutdown]
mov ecx, dword [0x61a3bc]
push ecx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov dword [0x61a3bc], 0xffffffff
mov eax, dword [0x61a3b8]
cmp eax, 0xffffffff
mov dword [0x679ac4], 0
je 0x5085f0
mov edx, dword [0x6a0f40]
push 8
push 0x8034
push edx
push eax
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret