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

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov edi, eax
mov esi, dword [edi + 0x3c]
xor eax, eax
xor ebx, ebx
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], eax
cmp byte [edi + 3], al
jne 0x10058408
lea ebx, [eax + 4]
mov ebp, dword [esp + 0x50]
cmp byte [edi + 4], al
je 0x1005842d
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x64]
add eax, ecx
cdq
push edx
push eax
lea ecx, [ebx + ebp]
call fcn.10036c30
add esp, 8
add ebx, eax
jmp 0x10058435
mov dword [esp + 0x68], eax
mov dword [esp + 0x64], eax
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x58]
push edx
push eax
lea ecx, [ebx + ebp]
call fcn.10036c30
lea ecx, [esp + 0x34]
push ecx
push ebp
push edi
add ebx, eax
call fcn.10039f60
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x7c]
add esp, 0x14
cmp byte [edi + 2], 0
lea eax, [ecx + edx]
mov dword [esp + 0x10], eax
je 0x1005847f
mov edx, dword [esp + 0x60]
mov dword [esp + 0x68], ecx
mov dword [esp + 0x64], 0
jmp 0x100584b2
cmp dword [esp + 0x5c], 0
jg 0x100586e8
mov ecx, dword [esp + 0x58]
jl 0x1005849c
cmp ecx, 0x7fffffff
ja 0x100586e8
mov edx, dword [esp + 0x54]
test edx, edx
je 0x100586e8
add eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x68], ecx
mov edi, dword [esp + 0x6c]
add ebx, ebp
movzx ebp, word [esp + 0x48]
add ebp, dword [esp + 0x50]
mov dword [esp + 0x18], edx
movzx edx, word [esp + 0x4a]
mov dword [edi], edx
movzx edi, word [esp + 0x46]
test eax, eax
jle 0x100586b8
jmp 0x100584ec
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x68]
test edi, edi
jne 0x1005863b
cmp byte [esi + 0x12], 0
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x28], ecx
je 0x10058553
movzx edx, word [esi + 0x16]
movzx esi, word [esi + 0x14]
mov eax, 0x66666667
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
lea edi, [edx + eax + 1]
mov eax, dword [0x1011c114]
cdq
idiv esi
lea esi, [ecx - 2]
lea ebx, [eax + 1]
lea ebx, [ebx]
inc esi
xor edx, edx
mov eax, esi
div edi
inc ecx
imul eax, edi
add eax, 2
cmp eax, ebx
jne 0x10058543
inc eax
cmp eax, ecx
je 0x10058530
cmp ecx, ebx
je 0x10058530
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x14], ecx
push 0
push ecx
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x30]
push edx
push esi
call fcn.100578e0
mov edi, dword [esp + 0x38]
add esp, 0x14
cmp byte [esi + 0x12], 0
mov ebx, eax
mov dword [esp + 0x50], ebx
je 0x100585c8
test ebx, ebx
jne 0x100586c2
mov ebx, dword [esp + 0x28]
test ebx, ebx
setne cl
add cl, 3
movzx edx, cl
lea eax, [esp + 0x50]
push eax
mov eax, dword [esp + 0x18]
push edx
mov ecx, esi
call fcn.10056310
mov ebx, dword [esp + 0x58]
add esp, 8
test ebx, ebx
je 0x100585d0
test edi, edi
je 0x100585c8
mov eax, dword [edi + 0x44]
test eax, eax
je 0x100585c8
mov esi, dword [eax + 0x10]
call fcn.10037ea0
call fcn.10055e80
mov esi, dword [esp + 0x1c]
test ebx, ebx
jne 0x100586c2
mov eax, dword [esp + 0x14]
mov ecx, eax
shr ecx, 0x18
mov byte [ebp], cl
mov edx, eax
mov ecx, eax
mov byte [ebp + 3], al
mov eax, dword [esp + 0x20]
shr edx, 0x10
shr ecx, 8
mov byte [ebp + 1], dl
mov byte [ebp + 2], cl
test eax, eax
je 0x1005860f
mov eax, dword [eax + 0x44]
test eax, eax
je 0x1005860f
mov esi, dword [eax + 0x10]
call fcn.10037ea0
call fcn.10055e80
mov esi, dword [esp + 0x1c]
mov ebp, dword [edi + 0x40]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x68]
mov byte [ebp], 0
mov byte [ebp + 1], 0
mov byte [ebp + 2], 0
mov byte [ebp + 3], 0
mov ebx, dword [edi + 0x40]
mov dword [esp + 0x20], edi
movzx edi, word [esi + 0x16]
add ebx, 4
sub edi, 4
cmp eax, edi
mov esi, eax
jle 0x10058643
mov esi, edi
test ecx, ecx
jle 0x1005865b
cmp esi, ecx
jle 0x1005864d
mov esi, ecx
mov edx, dword [esp + 0x18]
push esi
push edx
push ebx
call fcn.100ae5b0
jmp 0x10058664
push esi
push 0
push ebx
call fcn.100ae530
mov eax, dword [esp + 0x74]
sub dword [esp + 0x1c], esi
add dword [esp + 0x24], esi
sub eax, esi
add esp, 0xc
add ebx, esi
sub edi, esi
mov dword [esp + 0x68], eax
test eax, eax
jne 0x10058691
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x68], eax
mov dword [esp + 0x18], ecx
cmp dword [esp + 0x10], 0
jg 0x100584e0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x100586b8
mov eax, dword [eax + 0x44]
test eax, eax
je 0x100586b8
mov esi, dword [eax + 0x10]
call fcn.10037ea0
call fcn.10055e80
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3c
ret
mov eax, dword [esp + 0x20]
test eax, eax
je 0x100586de
mov eax, dword [eax + 0x44]
test eax, eax
je 0x100586de
mov esi, dword [eax + 0x10]
call fcn.10037ea0
call fcn.10055e80
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x3c
ret
pop edi
pop esi
pop ebp
mov eax, 0xb
pop ebx
add esp, 0x3c
ret