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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x583f97
cmp byte [eax], 0x31
jne 0x583f97
cmp dword [ebp + 0x24], 0x38
jne 0x583f97
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
test ebx, ebx
je 0x583f8b
mov ecx, dword [ebx + 0x20]
mov dword [ebx + 0x18], 0
test ecx, ecx
jne 0x583c9c
mov dword [ebx + 0x28], ecx
mov ecx, 0x5853e0
mov dword [ebx + 0x20], 0x5853e0
cmp dword [ebx + 0x24], 0
jne 0x583ca9
mov dword [ebx + 0x24], 0x585400
cmp dword [ebp + 0xc], 0xffffffff
mov edx, 6
mov edi, dword [ebp + 0x14]
mov eax, edi
cmovne edx, dword [ebp + 0xc]
not edi
mov dword [ebp + 0x24], edx
cdq
mov esi, eax
shr edi, 0x1f
mov eax, dword [ebp + 0x18]
xor esi, edx
dec eax
sub esi, edx
cmp eax, 8
ja 0x583f8b
cmp dword [ebp + 0x10], 8
jne 0x583f8b
lea eax, [esi - 8]
cmp eax, 7
ja 0x583f8b
cmp dword [ebp + 0x24], 9
ja 0x583f8b
cmp dword [ebp + 0x1c], 4
ja 0x583f8b
push 0x16c4
push 1
push dword [ebx + 0x28]
mov eax, 9
cmp esi, 8
cmove esi, eax
call ecx
mov edx, eax
add esp, 0xc
mov dword [ebp + 0x20], edx
test edx, edx
je 0x583e1c
mov dword [ebx + 0x1c], edx
mov ecx, esi
mov dword [edx + 0x18], edi
mov edi, 1
shl edi, cl
mov ecx, dword [ebp + 0x18]
mov dword [edx + 0x30], esi
add ecx, 7
mov dword [edx + 0x50], ecx
mov esi, 1
shl esi, cl
lea eax, [edi - 1]
mov dword [edx + 0x34], eax
add ecx, 2
mov dword [edx], ebx
mov dword [edx + 0x1c], 0
mov dword [edx + 0x2c], edi
lea eax, [esi - 1]
mov dword [edx + 0x54], eax
mov eax, 0xaaaaaaab
mov dword [edx + 0x4c], esi
mul ecx
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
shr edx, 1
push 1
mov dword [eax + 0x58], edx
mov edx, 1
lea ecx, [ecx + 6]
shl edx, cl
mov ecx, dword [ebp + 0x20]
mov dword [eax + 0x169c], edx
lea eax, [edx*4]
mov dword [ecx + 0xc], eax
lea eax, [esi + edi]
lea ecx, [edi + eax*2]
lea eax, [edx + edx*4]
lea eax, [eax + ecx*2]
push eax
push dword [ebx + 0x28]
mov eax, dword [ebx + 0x20]
call eax
mov edx, dword [ebp + 0x20]
mov esi, eax
add esp, 0xc
mov dword [edx + 8], esi
test esi, esi
jne 0x583e28
mov dword [edx + 4], 0x29a
mov ecx, dword [ebx + 0x1c]
test ecx, ecx
je 0x583e1c
mov eax, dword [ecx + 4]
cmp eax, 0x2a
je 0x583df3
cmp eax, 0x45
je 0x583df3
cmp eax, 0x49
je 0x583df3
cmp eax, 0x5b
je 0x583df3
cmp eax, 0x67
je 0x583df3
cmp eax, 0x71
je 0x583df3
cmp eax, 0x29a
jne 0x583e1c
mov eax, dword [ecx + 8]
test eax, eax
je 0x583e09
push eax
push dword [ebx + 0x28]
mov eax, dword [ebx + 0x24]
call eax
mov ecx, dword [ebx + 0x1c]
add esp, 8
mov eax, dword [ebx + 0x24]
push ecx
push dword [ebx + 0x28]
call eax
add esp, 8
mov dword [ebx + 0x1c], 0
pop edi
pop esi
mov eax, 0xfffffffc
pop ebx
pop ebp
ret 0x20
mov ecx, dword [edx + 0x169c]
mov byte [edx + 0x24], 8
lea eax, [esi + ecx*2]
mov dword [edx + 0x16a4], eax
lea eax, [esi + ecx*4]
mov dword [edx + 0x1698], eax
lea eax, [esi + ecx*4]
add eax, ecx
mov ecx, dword [edx + 0x2c]
mov dword [edx + 0x38], eax
lea eax, [eax + ecx*2]
mov dword [edx + 0x40], eax
lea eax, [eax + ecx*4]
mov dword [edx + 0x44], eax
mov eax, dword [ebp + 0x24]
mov dword [edx + 0x84], eax
mov eax, dword [ebp + 0x1c]
mov dword [edx + 0x88], eax
mov esi, dword [ebx + 0x1c]
test esi, esi
je 0x583f8b
cmp dword [ebx + 0x20], 0
je 0x583f8b
cmp dword [ebx + 0x24], 0
je 0x583f8b
mov dword [ebx + 0x14], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x2c], 2
mov ecx, dword [esi + 0x18]
mov eax, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], eax
test ecx, ecx
jns 0x583ec1
neg ecx
mov dword [esi + 0x18], ecx
test ecx, ecx
mov dword [esi + 0x28], 0
mov edx, 0x2a
mov eax, 0x71
cmovne eax, edx
push esi
mov dword [esi + 4], eax
call fcn.00586160
mov ecx, dword [esi + 0x2c]
add esp, 4
mov edx, dword [esi + 0x44]
lea eax, [ecx + ecx]
neg ecx
mov dword [esi + 0x3c], eax
cmp dword [0x647c20], 0
mov eax, dword [esi + 0x4c]
push eax
push edx
push ecx
je 0x583f07
call fcn.00466c20
jmp 0x583f0c
call fcn.00401010
mov eax, dword [esi + 0x84]
pop edi
lea ecx, [eax + eax*2]
movzx eax, word [ecx*4 + 0x6064c2]
mov dword [esi + 0x80], eax
movzx eax, word [ecx*4 + 0x6064c0]
mov dword [esi + 0x8c], eax
movzx eax, word [ecx*4 + 0x6064c4]
mov dword [esi + 0x90], eax
movzx eax, word [ecx*4 + 0x6064c6]
mov dword [esi + 0x7c], eax
xor eax, eax
mov dword [esi + 0x6c], 0
mov dword [esi + 0x70], 0
mov dword [esi + 0x5c], 0
mov dword [esi + 0x74], 0
mov dword [esi + 0x78], 2
mov dword [esi + 0x60], 2
mov dword [esi + 0x68], 0
mov dword [esi + 0x48], 0
pop esi
pop ebx
pop ebp
ret 0x20
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
pop ebp
ret 0x20
mov eax, 0xfffffffa
pop ebp
ret 0x20