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

Disassembly:
sub esp, 0x48
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x5c]
mov eax, edi
test edi, edi
je 0x5838bf
shl eax, 4
mov ecx, 0x7d8954
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
mov eax, dword [0x7d8954]
call dword [eax + 0xc]
mov esi, eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
cdq
and edx, 0xf
add eax, edx
sar eax, 4
jmp 0x5838c5
xor esi, esi
mov dword [esp + 0x14], esi
mov ebp, connect
mov dword [esp + 0x4c], esi
test eax, eax
mov dword [esp + 0x50], edi
mov ebx, ebp
cmovne ebx, eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x54], ebx
test edi, edi
jle 0x583924
mov ebx, edi
test esi, esi
je 0x583914
sub esp, 0x10
mov ecx, esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00583bb0
add esi, 0x10
sub ebx, 1
jne 0x5838e7
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov eax, edi
test edi, edi
je 0x58395c
lea eax, [edi*4]
mov ecx, 0x7d8954
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
mov eax, dword [0x7d8954]
call dword [eax + 0xc]
mov ecx, eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
cdq
and edx, 3
add eax, edx
sar eax, 2
jmp 0x583962
xor ecx, ecx
mov dword [esp + 0x20], ecx
test eax, eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edi
cmovne ebp, eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x48], ebp
test edi, edi
jle 0x5839ea
mov ebx, dword [esp + 0x64]
mov ebp, dword [esp + 0x60]
add ebx, 8
mov dword [esp + 0x18], edi
sub ebp, ecx
mov dword [esp + 0x24], ecx
mov edi, ecx
mov eax, dword [edi + ebp]
mov ecx, esi
push 0
mov dword [edi], eax
call fcn.00583dc0
mov ecx, dword [ebx - 8]
push 1
mov dword [eax], ecx
mov ecx, esi
call fcn.00583dc0
mov ecx, dword [ebx - 4]
push 2
mov dword [eax], ecx
mov ecx, esi
call fcn.00583dc0
mov ecx, dword [ebx]
push 3
mov dword [eax], ecx
mov ecx, esi
call fcn.00583dc0
mov ecx, dword [ebx + 4]
lea edi, [edi + 4]
add esi, 0x10
lea ebx, [ebx + 0x10]
sub dword [esp + 0x18], 1
mov dword [eax], ecx
jne 0x583992
mov edi, dword [esp + 0x5c]
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x10]
movss xmm0, dword [esp + 0x6c]
lea eax, [esp + 0x34]
mov esi, dword [esp + 0x68]
push eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x38], 0
push eax
lea eax, [esp + 0x64]
mov dword [esp + 0x40], 0
push eax
push ecx
movss dword [esp], xmm0
lea eax, [esp + 0x50]
push esi
push eax
lea eax, [esp + 0x64]
mov dword [esp + 0x54], connect
push eax
lea eax, [edi - 1]
mov dword [esp + 0x44], 0
push eax
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], connect
call fcn.00584520
mov ecx, dword [esp + 0x7c]
add esp, 0x20
mov edx, dword [esp + 0x78]
mov edi, dword [esp + 0x70]
lea eax, [ecx + 1]
mov dword [edx], eax
lea eax, [esi + 2]
add eax, ecx
mov dword [edi], eax
cmp dword [edx], 0
jle 0x583acf
mov edi, dword [esp + 0x7c]
mov ebp, edx
mov esi, dword [esp + 0x34]
add edi, 8
xor ebx, ebx
nop dword [eax]
push 0
mov ecx, esi
call fcn.00583dc0
push 1
mov ecx, esi
mov eax, dword [eax]
mov dword [edi - 8], eax
call fcn.00583dc0
push 2
mov ecx, esi
mov eax, dword [eax]
mov dword [edi - 4], eax
call fcn.00583dc0
push 3
mov ecx, esi
mov eax, dword [eax]
mov dword [edi], eax
call fcn.00583dc0
inc ebx
lea edi, [edi + 0x10]
add esi, 0x10
mov eax, dword [eax]
mov dword [edi - 0xc], eax
cmp ebx, dword [ebp]
jl 0x583a80
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x70]
mov esi, dword [esp + 0x28]
xor edx, edx
cmp dword [edi], edx
jle 0x583af2
mov ecx, dword [esp + 0x74]
sub esi, ecx
nop
mov eax, dword [esi + ecx]
lea ecx, [ecx + 4]
mov dword [ecx - 4], eax
inc edx
cmp edx, dword [edi]
jl 0x583ae0
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
mov dword [esp + 0x2c], 0
test eax, eax
js 0x583b19
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push esi
call dword [eax + 0x10]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], connect
mov dword [esp + 0x38], 0
test eax, eax
js 0x583b53
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 4
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x38]
call dword [eax + 0x10]
mov dword [esp + 0x34], 0
mov dword [esp + 0x3c], connect
test ebp, ebp
js 0x583b82
mov eax, dword [0x7d8954]
and ebp, 0x3fffffff
shl ebp, 2
mov ecx, 0x7d8954
push ebp
push dword [esp + 0x24]
call dword [eax + 0x10]
test ebx, ebx
js 0x583ba1
mov eax, dword [0x7d8954]
and ebx, 0x3fffffff
shl ebx, 4
mov ecx, 0x7d8954
push ebx
push dword [esp + 0x18]
call dword [eax + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret