Function at 0x508df0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5ed202
mov eax, dword fs:[0]
push eax
sub esp, 0x78
push ebx
push esi
push edi
mov eax, dword [0x64c874]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
xor eax, eax
xor ebx, ebx
push edi
lea esi, [esp + 0x30]
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
call fcn.004a90b0
mov eax, dword [esp + 0x2c]
cmp eax, ebx
jne 0x508e84
cmp eax, 1
jne 0x508e71
lea edi, [esp + 0x70]
lea ebx, [esp + 0x34]
call fcn.004a8dc0
mov edi, dword [ebp + 0xc]
jmp 0x508e7c
mov eax, dword [esp + 0x6c]
cmp dword [esp + 0x30], eax
sete al
test al, al
jne 0x5090f8
movzx eax, word [edi + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
test ax, ax
je 0x5090f8
push edi
lea esi, [esp + 0x6c]
call fcn.004a90b0
cmp dword [esp + 0x68], 1
jne 0x508ed6
push edi
lea esi, [esp + 0x6c]
call fcn.004a90b0
lea ecx, [esp + 0x2c]
push ecx
mov ecx, esi
call fcn.004a8900
cmp byte [eax], 0xfe
jne 0x508ed6
mov dl, byte [eax + 1]
and dl, 0xc0
cmp dl, 0x80
je 0x5090f8
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x14]
mov esi, dword [eax + 0x2e8]
cmp byte [esi + 0x1fa], 0
mov dword [esp + 0x14], esi
jne 0x508f8c
mov eax, dword [eax + 0xa8]
test byte [eax + 0x158], 4
je 0x508f8c
add esi, 0x380
mov dword [esp + 0x14], esi
call fcn.004f4b70
test al, al
je 0x5090f8
mov ecx, dword [ebx + 0x14]
lea eax, [esp + 0x18]
push eax
call fcn.004e7a70
mov ebx, eax
push edi
lea esi, [esp + 0x6c]
mov dword [esp + 0x94], 0
call fcn.004a90b0
mov ecx, esi
mov edx, ebx
lea eax, [esp + 0x2c]
call fcn.004d3b00
mov byte [esp + 0x90], 1
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.004c4090
lea edx, [esp + 0x2c]
push edx
mov byte [esp + 0x94], 0
call fcn.004c2120
lea eax, [esp + 0x18]
mov dword [esp + 0x90], 0xffffffff
call fcn.004d0760
jmp 0x5090f8
movzx eax, word [edi + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
movzx eax, ax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
lea edx, [esi + 0xa08]
call fcn.0054b390
test al, 1
je 0x509049
add esi, 0x380
mov dword [esp + 0x14], esi
call fcn.004f4b70
test al, al
je 0x509039
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [ebx + 0x14]
call fcn.004e7a70
mov dword [esp + 0x18], eax
push edi
lea esi, [esp + 0x6c]
mov dword [esp + 0x94], 2
call fcn.004a90b0
mov edx, dword [esp + 0x18]
mov ecx, esi
lea eax, [esp + 0x2c]
call fcn.004d3b00
mov byte [esp + 0x90], 3
mov edx, dword [esp + 0x14]
push eax
push edx
call fcn.004c4090
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x94], 2
call fcn.004c2120
lea eax, [esp + 0x20]
mov dword [esp + 0x90], 0xffffffff
call fcn.004d0760
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebx + 0x14]
push 2
push ecx
push edi
push edx
jmp 0x5090f3
cmp byte [esi + 0x2a5], 0
je 0x509112
mov eax, edi
call fcn.0049d9d0
cmp ax, 0x400
jae 0x509112
add esi, 0x380
mov dword [esp + 0x14], esi
call fcn.004f4b70
test al, al
je 0x5090e8
mov ecx, dword [ebx + 0x14]
lea eax, [esp + 0x20]
push eax
call fcn.004e7a70
mov dword [esp + 0x18], eax
push edi
lea esi, [esp + 0x6c]
mov dword [esp + 0x94], 4
call fcn.004a90b0
mov edx, dword [esp + 0x18]
mov ecx, esi
lea eax, [esp + 0x2c]
call fcn.004d3b00
mov byte [esp + 0x90], 5
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.004c4090
mov byte [esp + 0x90], 4
lea edx, [esp + 0x2c]
push edx
call fcn.004c2120
lea eax, [esp + 0x20]
mov dword [esp + 0x90], 0xffffffff
call fcn.004d0760
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebx + 0x14]
push 2
push eax
push edi
push ecx
call fcn.004ecda0
xor eax, eax
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [ebx + 0x14]
test byte [edx + 0x545], 0x40
je 0x5091af
push edi
lea esi, [esp + 0x6c]
call fcn.004a90b0
mov esi, dword [esp + 0x14]
add esi, 0x9f0
lea ecx, [esp + 0x68]
call fcn.0054b220
test al, 1
je 0x5091af
mov esi, dword [esp + 0x14]
add esi, 0x380
mov dword [esp + 0x14], esi
call fcn.004f4b70
test al, al
je 0x5090e8
mov ecx, dword [ebx + 0x14]
lea eax, [esp + 0x20]
push eax
call fcn.004e7a70
mov dword [esp + 0x18], eax
push edi
lea esi, [esp + 0x6c]
mov dword [esp + 0x94], 6
call fcn.004a90b0
mov edx, dword [esp + 0x18]
mov ecx, esi
lea eax, [esp + 0x2c]
call fcn.004d3b00
mov byte [esp + 0x90], 7
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.004c4090
mov byte [esp + 0x90], 6
jmp 0x5090ca
mov edx, dword [ebx + 0x14]
mov eax, dword [edx + 0x2e8]
cmp byte [eax + 0xbc], 0
push edi
je 0x509256
lea esi, [esp + 0x30]
call fcn.004a90b0
mov ecx, esi
mov esi, dword [ebp + 8]
push ecx
lea ebx, [esp + 0x6c]
call fcn.00506880
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x7c]
push edi
sub esp, 0xc
mov eax, esp
mov dword [eax + 4], edx
mov edx, dword [esp + 0x7c]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x80]
mov dword [eax], 0
mov dword [esp + 0x28], esp
sub esp, 0xc
mov eax, esp
lea esi, [esp + 0x48]
mov dword [esp + 0x34], esp
mov dword [eax], 0
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
call fcn.0050a2d0
mov edx, dword [eax]
mov ebx, dword [eax + 4]
mov eax, dword [eax + 8]
add esp, 0x1c
lea esi, [esp + 0x74]
lea edi, [esp + 0x20]
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], eax
call fcn.004598e0
test al, al
je 0x509333
jmp 0x5094aa
lea esi, [esp + 0x6c]
mov byte [esp + 0x1c], 0
call fcn.004a90b0
mov ecx, dword [esp + 0x18]
push ecx
sub esp, 0xc
mov edi, esp
mov dword [esp + 0x28], esp
call fcn.00456bc0
sub esp, 0xc
mov esi, esp
mov dword [esp + 0x34], esp
call fcn.0052ae20
lea ecx, [esp + 0x84]
lea esi, [esp + 0x48]
call fcn.0050a330
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x3c], edx
mov edx, dword [eax + 8]
add esp, 0x1c
lea edi, [esp + 0x2c]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
call fcn.00456bc0
mov esi, eax
lea edi, [esp + 0x20]
call fcn.004598e0
test al, al
je 0x50932f
mov eax, dword [ebp + 0xc]
push eax
lea esi, [esp + 0x6c]
call fcn.004a90b0
mov eax, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
mov esi, eax
mov edi, eax
shr esi, 2
and edi, 3
test ebx, ebx
jne 0x5092f0
call fcn.005b8b18
mov eax, dword [esp + 0x28]
mov ecx, dword [ebx + 0x10]
add ecx, dword [ebx + 0xc]
cmp eax, ecx
jb 0x5092ff
call fcn.005b8b18
mov eax, dword [ebx + 8]
cmp eax, esi
ja 0x509308
sub esi, eax
mov edx, dword [ebx + 4]
mov eax, dword [edx + esi*4]
lea ecx, [eax + edi*4]
mov ecx, dword [ecx]
lea eax, [esp + 0x2c]
call fcn.004d02e0
lea ecx, [esp + 0x68]
mov edx, eax
call fcn.004a8aa0
test al, al
jne 0x5094a6
mov ebx, dword [esp + 0x24]
mov ecx, dword [ebp + 0xc]
push ecx
lea esi, [esp + 0x6c]
call fcn.004a90b0
cmp dword [esp + 0x68], 1
sete al
test al, al
mov byte [esp + 0x13], al
je 0x509369
mov edi, dword [ebp + 8]
mov edx, dword [edi + 0x14]
mov eax, dword [edx + 0x2e8]
lea ecx, [eax + 0x2e4]
call fcn.00509d60
jmp 0x509383
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
mov eax, dword [ecx + 0x2e8]
lea ecx, [eax + 0x2c8]
call fcn.00509d60
mov edi, dword [ebp + 8]
mov esi, eax
test esi, esi
mov dword [esp + 0x18], esi
je 0x5090f8
cmp byte [esp + 0x13], 0
mov ecx, 0x1f4
je 0x5093d3
mov edx, dword [edi + 0x14]
mov eax, dword [edx + 0x2e8]
mov dword [eax + 0x2f8], ecx
mov dword [eax + 0x2f4], ecx
mov dword [esp + 0x14], esi
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 0x10]
mov dl, 1
mov edi, esi
mov dword [esp + 0x94], 8
call fcn.005069e0
jmp 0x509407
mov eax, dword [edi + 0x14]
mov eax, dword [eax + 0x2e8]
mov dword [eax + 0x2dc], ecx
mov dword [eax + 0x2d8], ecx
mov dword [esp + 0x14], esi
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
push edx
mov cl, 1
mov edi, esi
mov dword [esp + 0x94], 9
call fcn.005068f0
movsx eax, byte [ebp + 0x14]
mov edi, dword [ebp + 8]
push eax
mov dword [esp + 0x94], 0xffffffff
mov ecx, dword [esp + 0x2c]
sub esp, 0xc
mov eax, esp
mov dword [esp + 0x28], esp
mov dword [eax], 0
mov dword [eax + 4], ebx
mov dword [eax + 8], ecx
push esi
mov eax, edi
call fcn.00508910
test al, al
jne 0x509479
cmp byte [esp + 0x13], al
je 0x50945f
mov edx, dword [edi + 0x14]
mov eax, dword [edx + 0x2e8]
add eax, 0x2e4
mov edx, esi
call fcn.00509d80
jmp 0x5090f8
mov eax, dword [edi + 0x14]
mov eax, dword [eax + 0x2e8]
add eax, 0x2c8
mov edx, esi
call fcn.00509d80
jmp 0x5090f8
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [edi + 0x14]
push 1
push ecx
push edx
push eax
call fcn.004ecda0
mov eax, esi
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov esi, eax
mov edi, eax
shr esi, 2
and edi, 3
test ebx, ebx
jne 0x5094c5
call fcn.005b8b18
mov eax, dword [esp + 0x28]
mov ecx, dword [ebx + 0x10]
add ecx, dword [ebx + 0xc]
cmp eax, ecx
jb 0x5094d4
call fcn.005b8b18
mov eax, dword [ebx + 8]
cmp eax, esi
ja 0x5094dd
sub esi, eax
mov edx, dword [ebx + 4]
mov eax, dword [edx + esi*4]
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ebp + 0x14]
mov esi, dword [eax + edi*4]
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
push ecx
push edx
mov eax, esi
call fcn.00508ad0
mov eax, dword [ebp + 0xc]
mov ecx, dword [edi + 0x14]
push 0
push ebx
push eax
push ecx
call fcn.004ecda0
mov eax, esi
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10