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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xa
push 0
push 0
dec ecx
jne 0x508f8c
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x50968d
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [setsockopt]
mov edx, dword [edx + 0x160]
lea eax, [ebp - 0x1c]
mov ecx, dword [ebx + 0x264]
call fcn.004056ac
mov eax, dword [ebp - 0x1c]
call fcn.0040adc4
test al, al
jne 0x508fef
mov edx, dword [setsockopt]
mov edx, dword [edx + 0x160]
lea eax, [ebp - 0x20]
mov ecx, dword [ebx + 0x264]
call fcn.004056ac
mov eax, dword [ebp - 0x20]
call fcn.0040afe0
mov eax, dword [0x6c0984]
mov eax, dword [eax]
mov edx, dword [ebx + 0x14]
call fcn.0066e830
test eax, eax
jne 0x509665
lea eax, [ebp - 8]
mov edx, 0x5096a4
call fcn.0040542c
mov eax, dword [setsockopt]
push dword [eax + 0x160]
push dword [ebx + 0x264]
push 0x5096b8
push dword [ebp - 8]
lea eax, [ebp - 4]
mov edx, 4
call fcn.00405728
mov ecx, dword [ebp - 4]
mov dl, 1
mov eax, dword [0x42c94c]
call fcn.0042ca04
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x509665
cmp dword [ebx + 0x18], 0
je 0x509071
mov eax, dword [ebx + 0x18]
push eax
mov ecx, 0x5096c4
mov edx, 0x5096d8
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 4]
cmp dword [ebx + 0x1c], 0
je 0x50908d
mov eax, dword [ebx + 0x1c]
push eax
mov ecx, 0x5096e8
mov edx, 0x5096d8
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 4]
push dword [ebx + 0x34]
push dword [ebx + 0x30]
mov ecx, 0x5096fc
mov edx, 0x5096d8
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0x34]
push dword [ebx + 0x3c]
push dword [ebx + 0x38]
mov ecx, 0x509710
mov edx, 0x5096d8
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0x34]
push dword [ebx + 0x23c]
push dword [ebx + 0x238]
mov ecx, 0x509720
mov edx, 0x5096d8
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0x34]
mov eax, dword [ebx + 0x240]
test eax, eax
je 0x5090f8
push eax
mov ecx, 0x509734
mov edx, 0x5096d8
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0x244]
test eax, eax
je 0x509115
push eax
mov ecx, 0x509748
mov edx, 0x5096d8
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0x268]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x509159
inc eax
mov dword [ebp - 0x18], eax
xor esi, esi
push dword [ebp - 0xc]
lea ecx, [ebp - 0x24]
mov edx, esi
mov eax, dword [ebx + 0x268]
mov edi, dword [eax]
call dword [edi + 0xc]
push dword [ebp - 0x24]
push 0x50975c
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00405728
inc esi
dec dword [ebp - 0x18]
jne 0x50912b
cmp dword [ebp - 0xc], 0
je 0x509175
mov eax, dword [ebp - 0xc]
push eax
mov ecx, 0x509768
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 4]
cmp dword [ebx + 0x14], 0
je 0x509191
mov eax, dword [ebx + 0x14]
push eax
mov ecx, 0x509790
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 4]
cmp dword [ebx + 0x24], 0
je 0x5091ad
mov eax, dword [ebx + 0x24]
push eax
mov ecx, 0x5097a4
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 4]
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x5091c7
push eax
mov ecx, 0x5097bc
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x5091e1
push eax
mov ecx, 0x5097d0
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0x248]
test eax, eax
je 0x5091fe
push eax
mov ecx, 0x5097e4
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0x24c]
test eax, eax
je 0x50921b
push eax
mov ecx, 0x5097fc
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
cmp dword [ebx + 0x254], 0
je 0x50923d
mov eax, dword [ebx + 0x254]
push eax
mov ecx, 0x509814
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 4]
cmp dword [ebx + 0x258], 0
je 0x50925f
mov eax, dword [ebx + 0x258]
push eax
mov ecx, 0x50982c
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 4]
mov eax, dword [ebx + 0x25c]
test eax, eax
je 0x50927c
push eax
mov ecx, 0x509844
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0x260]
test eax, eax
je 0x509299
push eax
mov ecx, 0x509860
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x5092b3
push eax
mov ecx, 0x50987c
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0x5c]
test eax, eax
je 0x5092cd
push eax
mov ecx, 0x509890
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
cmp dword [ebx + 0x60], 0
je 0x5092e9
mov eax, dword [ebx + 0x60]
push eax
mov ecx, 0x5098a4
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 4]
cmp dword [ebx + 0x6c], 0
je 0x509323
movzx eax, byte [ebx + 0x64]
push eax
mov ecx, 0x5098bc
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0x14]
mov eax, dword [ebx + 0x6c]
movzx eax, word [eax + 0x11e]
push eax
mov ecx, 0x5098d4
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0x70]
test eax, eax
je 0x50933d
push eax
mov ecx, 0x5098e8
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0x74]
test eax, eax
je 0x509357
push eax
mov ecx, 0x5098fc
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
cmp dword [ebx + 0x78], 0
je 0x509373
mov eax, dword [ebx + 0x78]
push eax
mov ecx, 0x509910
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 4]
mov eax, dword [ebx + 0x84]
test eax, eax
je 0x509397
movzx eax, word [eax + 0x11e]
push eax
mov ecx, 0x509928
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0x88]
test eax, eax
je 0x5093b4
push eax
mov ecx, 0x50993c
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0x8c]
test eax, eax
je 0x5093d1
push eax
mov ecx, 0x509950
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
cmp dword [ebx + 0x90], 0
je 0x5093f3
mov eax, dword [ebx + 0x90]
push eax
mov ecx, 0x509964
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 4]
mov eax, dword [ebx + 0x9c]
test eax, eax
je 0x509417
movzx eax, word [eax + 0x11e]
push eax
mov ecx, 0x50997c
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0xa0]
test eax, eax
je 0x509434
push eax
mov ecx, 0x509994
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebx + 0xa4]
test eax, eax
je 0x509451
push eax
mov ecx, 0x5099a8
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
cmp dword [ebx + 0xa8], 0
je 0x509473
mov eax, dword [ebx + 0xa8]
push eax
mov ecx, 0x5099bc
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 4]
mov eax, dword [ebx + 0xb4]
test eax, eax
je 0x509497
movzx eax, word [eax + 0x11e]
push eax
mov ecx, 0x5099d4
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
xor esi, esi
lea eax, [esi + esi*2]
lea eax, [ebx + eax*8 + 0x118]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
cmp dword [eax + 8], 0
je 0x5094eb
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
push eax
push 0x5099e8
lea edx, [ebp - 0x2c]
lea eax, [esi + 1]
call fcn.0040a790
push dword [ebp - 0x2c]
push 0x5099f8
lea eax, [ebp - 0x28]
mov edx, 3
call fcn.00405728
mov ecx, dword [ebp - 0x28]
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 4]
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x14], 0
je 0x509539
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x14]
movzx eax, word [eax + 0x11e]
push eax
push 0x5099e8
lea edx, [ebp - 0x34]
lea eax, [esi + 1]
call fcn.0040a790
push dword [ebp - 0x34]
push 0x509a08
lea eax, [ebp - 0x30]
mov edx, 3
call fcn.00405728
mov ecx, dword [ebp - 0x30]
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
jmp 0x509570
push 0
push 0x5099e8
lea edx, [ebp - 0x3c]
lea eax, [esi + 1]
call fcn.0040a790
push dword [ebp - 0x3c]
push 0x509a08
lea eax, [ebp - 0x38]
mov edx, 3
call fcn.00405728
mov ecx, dword [ebp - 0x38]
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
inc esi
cmp esi, 0xc
jne 0x509499
xor esi, esi
lea eax, [esi + esi*2]
lea eax, [ebx + eax*8 + 0xb8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
cmp dword [eax + 8], 0
je 0x5095ce
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
push eax
push 0x509a14
lea edx, [ebp - 0x44]
lea eax, [esi + 1]
call fcn.0040a790
push dword [ebp - 0x44]
push 0x5099f8
lea eax, [ebp - 0x40]
mov edx, 3
call fcn.00405728
mov ecx, dword [ebp - 0x40]
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 4]
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x14], 0
je 0x50961c
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x14]
movzx eax, word [eax + 0x11e]
push eax
push 0x509a14
lea edx, [ebp - 0x4c]
lea eax, [esi + 1]
call fcn.0040a790
push dword [ebp - 0x4c]
push 0x509a08
lea eax, [ebp - 0x48]
mov edx, 3
call fcn.00405728
mov ecx, dword [ebp - 0x48]
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
jmp 0x509653
push 0
push 0x509a14
lea edx, [ebp - 0x54]
lea eax, [esi + 1]
call fcn.0040a790
push dword [ebp - 0x54]
push 0x509a08
lea eax, [ebp - 0x50]
mov edx, 3
call fcn.00405728
mov ecx, dword [ebp - 0x50]
mov edx, 0x509780
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
inc esi
cmp esi, 4
jne 0x50957c
mov eax, dword [ebp - 0x10]
call fcn.00404430
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x509694
lea eax, [ebp - 0x54]
mov edx, 0xf
call fcn.004053b8
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004053b8
ret