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

Disassembly:
push 0xffffffffffffffff
push 0x5fee20
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov ecx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x54]
mov eax, dword [ebp + 0x50]
test eax, eax
je 0x5a82d0
cmp dword [eax + 0x58], 0
je 0x5a82d0
mov esi, dword [esp + 0x58]
test esi, esi
je 0x5a82d0
cmp dword [ebp + 0x48], 0
je 0x5a82d0
mov eax, dword [esi]
mov edx, dword [eax + 4]
xor ebx, ebx
test ecx, ecx
setle bl
sub ebx, 1
and ebx, ecx
mov ecx, esi
mov dword [esp + 0x5c], ebx
call edx
cmp dword [ebp + 0x14], eax
jg 0x5a82d0
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov ecx, esi
call edx
mov ecx, dword [ebp + 0x18]
add ecx, ebx
cmp ecx, eax
jg 0x5a82d0
mov esi, dword [ebp + 0x48]
lea eax, [esi + 0x188]
mov dword [esp + 0x54], eax
call fcn.0057a810
mov edi, eax
lea eax, [edi + 1]
cdq
sub eax, edx
sar eax, 1
cmp edi, 2
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], eax
jne 0x5a7f93
mov dword [esp + 0x18], edi
add esi, 0x148
call fcn.0057f470
test eax, eax
je 0x5a7ff5
mov esi, dword [ebp + 0x48]
add esi, 0x148
call fcn.0058d050
test eax, eax
je 0x5a7ff5
mov eax, dword [ebp + 0x48]
movzx edx, byte [eax + 0x14c]
push 0
push edx
lea esi, [eax + 0x148]
call fcn.0058d050
mov esi, dword [ebp + 0x48]
push eax
add esi, 0x148
call fcn.0057f470
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
add ecx, ebx
push ecx
push edx
push ebx
mov ebx, eax
mov eax, dword [esp + 0x70]
call fcn.005811a0
mov ebx, dword [esp + 0x5c]
mov esi, dword [ebp + 0x50]
mov dword [esp + 0x1c], 0
call fcn.0057bdb0
cmp eax, 1
jne 0x5a8142
mov eax, dword [ebp + 8]
xor ecx, ecx
cmp eax, ecx
je 0x5a805c
cmp eax, 3
je 0x5a8066
cmp eax, 1
je 0x5a805c
mov esi, dword [esp + 0x58]
mov eax, dword [esi]
mov edx, dword [eax + 4]
push ecx
push 1
push 1
push ecx
push ecx
mov ecx, esi
mov dword [esp + 0x2c], edi
call edx
push eax
push 0
push 0
push esi
mov esi, dword [esp + 0x78]
call fcn.0057f6d0
mov eax, edi
add esp, 0x24
mov dword [esp + 0x1c], 1
sub eax, edi
jmp 0x5a8144
cmp eax, 3
je 0x5a8066
cmp eax, 1
jne 0x5a806a
mov dword [esp + 0x18], edi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ecx
mov eax, dword [esp + 0x54]
mov esi, edi
sub esi, dword [esp + 0x18]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x20], esi
call fcn.0057a810
cmp esi, eax
jge 0x5a80f1
jmp 0x5a80a4
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x18]
jge 0x5a80f1
cmp eax, edi
jge 0x5a80f1
cmp esi, edi
jge 0x5a80f1
mov edi, esi
mov esi, dword [esp + 0x54]
call fcn.0057a830
mov ebx, eax
lea esi, [esp + 0x30]
call fcn.0059c9d0
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x54]
add dword [esp + 0x1c], 1
add esi, 1
mov dword [esp + 0x20], esi
call fcn.0057a810
cmp esi, eax
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x5c]
jl 0x5a80a0
mov eax, dword [ebp + 0x14]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x58]
push 0
push 1
push 1
sub eax, edi
add eax, dword [esp + 0x24]
push 0
push 0
add eax, ebx
push eax
push ebx
push ecx
push edx
lea esi, [esp + 0x54]
call fcn.0057f6d0
add esp, 0x24
mov eax, esi
call fcn.004fc8d0
mov dword [esp + 0x1c], 1
mov dword [esp + 0x4c], 0xffffffff
call fcn.005cc490
mov eax, dword [esp + 0x18]
sub eax, edi
jmp 0x5a8144
xor eax, eax
cmp dword [ebp + 8], 2
jne 0x5a8156
mov ecx, edi
sub ecx, dword [esp + 0x28]
mov dword [esp + 0x18], ecx
jmp 0x5a8162
mov dword [esp + 0x18], 0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x54]
push 0
push 1
push edx
mov edx, dword [ebp + 0x18]
push 0
add edx, ecx
add edx, ebx
push edx
add eax, ebx
push 0
push eax
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x74]
push 0
push eax
call fcn.0057f6d0
mov edx, dword [ebp + 0x18]
mov ecx, dword [esp + 0x40]
add edx, dword [esp + 0x3c]
mov eax, dword [ebp + 0x14]
add esp, 0x24
push 0
push 1
push ecx
mov ecx, dword [esp + 0x38]
push 1
add edx, ebx
push edx
mov edx, dword [esp + 0x6c]
sub eax, edi
push eax
push ecx
push eax
push edx
call fcn.0057f6d0
mov eax, dword [ebp + 8]
xor ecx, ecx
add esp, 0x24
cmp eax, ecx
je 0x5a82ae
cmp eax, 3
je 0x5a82ae
cmp eax, 1
je 0x5a82ae
cmp edi, 2
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], eax
jne 0x5a81ef
mov dword [esp + 0x1c], edi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ecx
mov eax, dword [esp + 0x54]
mov esi, edi
sub esi, dword [esp + 0x1c]
mov dword [esp + 0x4c], 1
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], esi
call fcn.0057a810
cmp esi, eax
jge 0x5a8271
jmp 0x5a8228
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x1c]
jge 0x5a8271
cmp eax, edi
jge 0x5a8271
cmp esi, edi
jge 0x5a8271
mov edi, esi
mov esi, dword [esp + 0x54]
call fcn.0057a830
mov ebx, eax
lea esi, [esp + 0x30]
call fcn.0059c9d0
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x54]
add dword [esp + 0x20], 1
add esi, 1
mov dword [esp + 0x28], esi
call fcn.0057a810
cmp esi, eax
mov ebx, dword [esp + 0x5c]
jl 0x5a8220
mov ecx, dword [ebp + 0x18]
sub ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov edx, dword [ebp + 0x14]
push 0
push 1
push 1
push 1
add ebx, ecx
push ebx
sub edx, eax
push edx
push ebx
push eax
mov eax, dword [esp + 0x78]
push eax
lea esi, [esp + 0x54]
call fcn.0057f6d0
add esp, 0x24
mov eax, esi
call fcn.004fc8d0
call fcn.005cc490
jmp 0x5a82d0
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x14]
push ecx
push 1
push 1
push 1
sub edx, edi
add ebx, edx
push ebx
push eax
push ebx
push ecx
mov ecx, dword [esp + 0x78]
push ecx
call fcn.0057f6d0
add esp, 0x24
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret 0xc