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

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0xac
mov eax, dword [esp + 0xc0]
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], ecx
cmp eax, 5
jle 0x5853ce
mov ebp, 0xf
cmp eax, 0x64
jg 0x5854b9
mov ecx, 1
cmp eax, 9
jle 0x5853c2
sub eax, 9
imul eax, eax
imul ecx, eax, 0x27
mov edx, dword [ebx]
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [edx + 0x3c]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x5854c9
mov eax, dword [ebx + 0x20]
xor ebp, ebp
mov eax, dword [eax]
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0x44]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x28]
xor esi, esi
lea edi, [eax + 0x64]
lea ecx, [eax + 0x68]
mov eax, 1
mov dword [esp + 0x2c], edi
xor edi, edi
mov edx, dword [ecx]
cmp edx, esi
jb 0x585413
cmp edx, dword [esp + 0x24]
cmovbe edi, eax
cmovbe esi, edx
add eax, 1
add ecx, 4
cmp eax, 5
jne 0x585403
test byte [ebx + 0x2e], 2
jne 0x5855b1
cmp esi, dword [esp + 0x24]
jb 0x5855d1
test edi, edi
lea ecx, [edi + 3]
sete al
mov dword [esp + 0x30], ecx
test al, al
jne 0x5855d1
cmp byte [ebx + 0x2b], 0
jne 0x585462
mov eax, dword [ebx + 4]
mov edx, dword [esp + 0x30]
call fcn.0054af21
mov ebp, eax
test eax, eax
jne 0x585631
mov eax, dword [esp + 0x2c]
lea ebp, [eax + edi*4]
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0x60]
add eax, 1
cmp byte [ebx + 0x2b], 2
mov dword [ebx + 0x64], eax
je 0x585484
mov eax, dword [ebx + 4]
call fcn.0054abe1
mov eax, dword [ebp]
cmp eax, esi
jne 0x585a34
lea eax, [ebx + 0x34]
mov dword [esp + 8], 0x30
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x20]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.0086e9f9
mov ebp, eax
test eax, eax
jne 0x585a34
mov word [ebx + 0x28], di
add esp, 0xac
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [ebx + 0x32], 0
je 0x585651
cmp byte [ebx + 0x2b], 0
mov eax, dword [ebx + 4]
jne 0x5854f9
mov edx, 3
call fcn.0054af21
mov ebp, eax
test eax, eax
jne 0x585a1a
mov eax, dword [ebx + 4]
lea esi, [esi]
mov edx, dword [eax]
lea ecx, [esp + 0x6c]
xor edi, edi
mov dword [esp + 0xc], 0
mov word [ebx + 0x28], di
mov dword [esp + 0x10], ecx
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x34]
mov ebp, eax
cmp eax, 0x508
je 0x5857e1
mov dword [esp + 0x2c], 0
cmp eax, 8
je 0x5857aa
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call fcn.00547771
test ebp, ebp
je 0x5854b9
mov edx, dword [ebx + 0x18]
test edx, edx
jle 0x585592
mov eax, dword [ebx + 0x20]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
lea esi, [esi]
mov eax, dword [eax + esi*4]
mov dword [esp], eax
call fcn.00547771
mov eax, dword [ebx + 0x20]
mov dword [eax + esi*4], 0
add esi, 1
cmp esi, dword [ebx + 0x18]
jl 0x585571
mov dword [esp + 0x28], edi
mov byte [ebx + 0x32], 0
mov eax, ebx
call fcn.0054b101
mov eax, dword [esp + 0x28]
mov dword [eax], 1
jmp 0x5854b9
test edi, edi
jne 0x585621
cmp ebp, 5
je 0x58563a
add esp, 0xac
mov ebp, 0x508
pop ebx
mov eax, ebp
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x30], esi
mov ebp, 1
cmp byte [ebx + 0x2b], 0
lea esi, [ebp + 3]
jne 0x5856e1
mov eax, dword [ebx + 4]
mov ecx, 1
mov edx, esi
call fcn.0054af81
test eax, eax
je 0x5856e1
cmp eax, 5
jne 0x585a79
add ebp, 1
cmp ebp, 5
jne 0x5855da
mov esi, dword [esp + 0x30]
test edi, edi
je 0x58563a
lea esi, [esi]
lea esi, [esi]
lea eax, [edi + 3]
mov dword [esp + 0x30], eax
jmp 0x585446
cmp eax, 5
jne 0x5854b9
add esp, 0xac
mov ebp, 0xffffffff
pop ebx
mov eax, ebp
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0x28]
mov eax, ebx
call fcn.00584b91
mov ebp, eax
cmp eax, 5
je 0x585721
test eax, eax
jne 0x5854b9
cmp byte [ebx + 0x32], 0
jne 0x5854d3
mov eax, dword [ebx + 0x20]
mov edi, dword [eax]
mov dword [esp + 0x28], edi
mov edx, dword [edi + 0x60]
mov edi, dword [ebx + 0x44]
mov dword [esp + 0x24], edi
cmp edx, edi
jne 0x5853ec
movzx edx, byte [ebx + 0x2b]
mov ecx, dword [ebx + 4]
test dl, dl
jne 0x58575b
mov edx, 3
mov eax, ecx
call fcn.0054af21
cmp byte [ebx + 0x2b], 2
mov esi, eax
je 0x5856bf
mov eax, dword [ebx + 4]
call fcn.0054abe1
test esi, esi
je 0x5857a5
mov ebp, esi
cmp esi, 5
jne 0x5854b9
mov eax, dword [ebx + 0x44]
mov dword [esp + 0x24], eax
jmp 0x5853ec
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x30], esi
mov esi, ebp
lea ebp, [eax + ebp*4]
mov eax, dword [esp + 0x24]
mov dword [ebp], eax
cmp byte [ebx + 0x2b], 0
jne 0x58579a
mov eax, dword [ebx + 4]
mov edx, dword [esp + 0x30]
mov ecx, 1
mov edi, esi
call fcn.0054b021
mov esi, dword [esp + 0x24]
jmp 0x585446
mov eax, dword [ebx + 0x20]
mov ebp, dword [eax]
test ebp, ebp
je 0x58563a
cmp byte [ebx + 0x2b], 0
jne 0x58563a
mov eax, dword [ebx + 4]
mov edx, 2
call fcn.0054af21
mov ebp, eax
test eax, eax
je 0x5857c0
cmp eax, 5
mov eax, 0x105
cmove ebp, eax
jmp 0x5854b9
lea esi, [ebx + 0x34]
cmp dl, 2
je 0x585a4f
mov eax, ecx
call fcn.0054abe1
mov eax, dword [ebx + 0x20]
mov dword [esp + 8], 0x30
mov dword [esp + 4], esi
mov eax, dword [eax]
mov dword [esp], eax
call fcn.0086e9f9
test eax, eax
jne 0x585ac4
xor eax, eax
mov word [ebx + 0x28], ax
jmp 0x5854b9
mov edi, esi
mov esi, dword [esp + 0x24]
jmp 0x585469
lea esi, [ebx + 0x34]
jmp 0x58576e
mov dword [esp], 0
mov ebp, 0xffffffff
call fcn.00547771
jmp 0x585559
cmp byte [ebx + 0x2b], 0
mov eax, dword [ebx + 4]
jne 0x58563a
mov edx, 2
mov ebp, 0xffffffff
call fcn.0054af51
jmp 0x5854b9
mov eax, dword [ebx + 0x20]
mov eax, dword [eax]
mov ecx, dword [eax]
mov dword [ebx + 0x34], ecx
mov ecx, dword [eax + 4]
mov dword [ebx + 0x38], ecx
mov ecx, dword [eax + 8]
mov dword [ebx + 0x3c], ecx
mov ecx, dword [eax + 0xc]
mov dword [ebx + 0x40], ecx
mov ecx, dword [eax + 0x10]
mov dword [ebx + 0x44], ecx
mov ecx, dword [eax + 0x14]
mov dword [ebx + 0x48], ecx
mov ecx, dword [eax + 0x18]
mov dword [ebx + 0x4c], ecx
mov ecx, dword [eax + 0x1c]
mov dword [ebx + 0x50], ecx
mov ecx, dword [eax + 0x20]
mov dword [ebx + 0x54], ecx
mov ecx, dword [eax + 0x24]
mov dword [ebx + 0x58], ecx
mov ecx, dword [eax + 0x28]
mov dword [ebx + 0x5c], ecx
mov eax, dword [eax + 0x2c]
lea ecx, [esp + 0x78]
mov dword [ebx + 0x60], eax
mov eax, dword [ebx + 8]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x18]
mov ebp, eax
test eax, eax
jne 0x585a23
mov eax, 0x1f
cmp eax, dword [esp + 0x78]
mov eax, ebp
sbb eax, dword [esp + 0x7c]
jge 0x585a80
mov eax, dword [ebx + 8]
lea ecx, [esp + 0x80]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x20
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 8]
mov ebp, eax
test eax, eax
jne 0x585a23
mov esi, dword [esp + 0x90]
cmp dword [ebx + 0x54], esi
jne 0x5857aa
mov esi, dword [esp + 0x94]
cmp dword [ebx + 0x58], esi
jne 0x5857aa
movzx eax, word [ebx + 0x42]
mov esi, eax
call fcn.00582201
mov ebp, eax
test eax, eax
jne 0x585aa6
movzx eax, si
add eax, 0x18
cdq
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
call fcn.00553481
mov dword [esp + 0x2c], eax
mov edi, eax
test eax, eax
je 0x585aa6
add edi, 0x18
movzx ecx, word [ebx + 0x42]
mov esi, dword [esp + 0x38]
mov dword [esp + 0x34], edi
mov edi, dword [ebx + 0x4c]
add ecx, 0x18
mov dword [esp + 0x50], edi
mov edi, dword [ebx + 0x50]
mov eax, ecx
cdq
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x54], edi
mov edi, dword [ebx + 0x44]
imul edi, edx
mul dword [ebx + 0x44]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x4c], edx
add dword [esp + 0x4c], edi
mov edx, dword [esp + 0x4c]
add eax, 0x20
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x58], eax
adc edx, 0
add esi, eax
adc edi, edx
cmp dword [esp + 0x78], esi
mov dword [esp + 0x40], esi
sbb ecx, edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x5c], edx
jl 0x585ae3
mov edx, 0xffffffff
mov eax, 0xffffffe0
mov esi, dword [esp + 0x58]
mov edi, dword [esp + 0x5c]
mov ecx, edx
mov edx, eax
sub edx, dword [esp + 0x48]
sbb ecx, dword [esp + 0x4c]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ecx
jmp 0x5859de
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x70]
mov dword [esp + 4], ecx
lea ecx, [esp + 0x74]
mov dword [esp], eax
mov eax, ebx
call fcn.005465f1
test eax, eax
je 0x585a07
mov ecx, dword [esp + 0x74]
test ecx, ecx
jne 0x585abc
add esi, dword [esp + 0x38]
mov eax, dword [esp + 0x48]
adc edi, dword [esp + 0x3c]
add eax, dword [esp + 0x40]
mov edx, dword [esp + 0x4c]
adc edx, dword [esp + 0x44]
add eax, esi
adc edx, edi
cmp dword [esp + 0x78], eax
mov eax, dword [esp + 0x7c]
sbb eax, edx
jl 0x585a07
mov eax, dword [ebx + 8]
mov ecx, dword [esp + 0x30]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 8]
mov ebp, eax
test eax, eax
je 0x585988
mov eax, dword [esp + 0x50]
mov dword [ebx + 0x4c], eax
mov eax, dword [esp + 0x54]
mov dword [ebx + 0x50], eax
jmp 0x585545
cmp eax, 5
je 0x5857aa
mov dword [esp], 0
call fcn.00547771
jmp 0x585559
cmp byte [ebx + 0x2b], 0
jne 0x58563a
mov eax, dword [ebx + 4]
mov edx, dword [esp + 0x30]
call fcn.0054af51
jmp 0x58563a
mov dword [esp + 8], 0x30
mov dword [esp + 4], esi
mov eax, dword [eax]
mov dword [esp], eax
call fcn.0086e9f9
test eax, eax
je 0x58578f
jmp 0x58563a
mov ebp, eax
jmp 0x5854b9
mov eax, dword [esp + 0x28]
mov dword [eax], 1
mov esi, dword [ebx + 0x44]
test esi, esi
jne 0x5857aa
mov dword [esp], 0
call fcn.00547771
jmp 0x5854b9
mov dword [esp], 0
mov ebp, 7
call fcn.00547771
jmp 0x585559
or ebp, 0xffffffff
jmp 0x585a07
cmp byte [ebx + 0x2b], 0
mov eax, dword [ebx + 4]
jne 0x58563a
mov edx, 3
or ebp, 0xffffffff
call fcn.0054af51
jmp 0x5854b9
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call fcn.00547771
jmp 0x5854b9