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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9c
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x40], edx
mov dword [esp + 8], ecx
push ebx
push esi
push edi
cmp eax, 3
ja case.0x57c25f.1
jmp dword [eax*4 + 0x57c588]
mov dword [esp + 0x20], 0x57bfa0
jmp 0x57c28c
mov dword [esp + 0x20], 0x57bf80
jmp 0x57c28c
mov dword [esp + 0x20], 0x57bfc0
jmp 0x57c28c
mov dword [esp + 0x20], 0x57bf60
push edx
lea ecx, [esp + 0x7c]
call fcn.0057a3e0
push dword [ebp + 8]
lea ecx, [esp + 0x94]
call fcn.0057a3e0
mov cl, byte [esp + 0x8c]
mov eax, dword [esp + 0x88]
mov ebx, dword [esp + 0x84]
mov edi, dword [esp + 0x9c]
mov byte [esp + 0x12], cl
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x30], ecx
mov cl, byte [esp + 0xa4]
mov byte [esp + 0x13], cl
mov ecx, dword [esp + 0x98]
mov dword [esp + 0x18], eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x90]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], ecx
xor edx, edx
xor ecx, ecx
cmp ebx, edi
jge 0x57c332
mov eax, dword [esp + 0x18]
mov esi, ebx
cmp eax, edi
cmovg ebx, edi
cmp eax, edi
mov dword [esp + 0x2c], ebx
cmovg eax, edi
jmp 0x57c35b
mov ecx, dword [esp + 0x28]
jle 0x57c348
cmp eax, ebx
mov esi, edi
cmovg edi, ebx
cmp dword [esp + 0x1c], ebx
cmovg eax, ebx
jmp 0x57c35f
cmp dword [esp + 0x18], eax
mov edi, eax
mov esi, ebx
cmovle edi, dword [esp + 0x18]
mov dword [esp + 0x2c], edi
mov eax, edi
mov edx, dword [esp + 0x24]
mov ebx, dword [esp + 0x14]
mov ebx, dword [ebx + 0xc]
cmp esi, ebx
jge 0x57c580
cmp eax, ebx
cmovle ebx, eax
mov dword [esp + 0x38], ebx
test edx, edx
jne 0x57c3f3
test ecx, ecx
jne 0x57c3f3
mov ecx, dword [esp + 0x14]
sub ebx, dword [ecx + 4]
mov eax, dword [ecx + 8]
dec ebx
sub eax, dword [ecx]
mov esi, dword [ecx + 0x1c]
mov dword [esp + 0x48], eax
cmp ebx, dword [ecx + 0x20]
je 0x57c3b4
push 1
mov dword [ecx + 0x20], ebx
call fcn.0057b470
mov esi, eax
mov eax, dword [esp + 0x14]
mov dword [esi], ebx
mov dword [esi + 4], 0
mov dword [eax + 0x1c], esi
mov ebx, dword [esi + 4]
neg ebx
mov eax, dword [esi + 8]
mov dword [esp + 0x44], eax
je 0x57c3d6
push ebx
xor edx, edx
mov ecx, eax
call fcn.0057b710
mov eax, dword [esp + 0x48]
add esp, 4
add dword [esi + 4], ebx
mov ebx, dword [esp + 0x48]
xor edx, edx
push ebx
mov ecx, eax
call fcn.0057b710
add esp, 4
add dword [esi + 4], ebx
mov ebx, dword [esp + 0x38]
jmp 0x57c4a5
mov eax, dword [esp + 0x14]
cmp esi, dword [eax + 4]
jl 0x57c4a5
mov eax, dword [esp + 0x4c]
test edx, edx
mov dword [esp + 0x64], edx
cmove eax, dword [esp + 0x14]
mov esi, dword [eax]
mov eax, dword [eax + 8]
mov dword [esp + 0x68], esi
mov dword [esp + 0x70], eax
je 0x57c435
movzx eax, byte [edx]
add eax, esi
mov byte [esp + 0x74], 0
mov dword [esp + 0x6c], eax
mov al, byte [edx + 1]
mov byte [esp + 0x75], al
jmp 0x57c444
mov word [esp + 0x74], 1
mov dword [esp + 0x6c], SysReAllocString
mov eax, dword [ebp + 8]
test ecx, ecx
mov esi, dword [esp + 0x14]
cmove eax, esi
mov dword [esp + 0x50], ecx
mov edx, dword [eax]
mov eax, dword [eax + 8]
mov dword [esp + 0x54], edx
mov dword [esp + 0x5c], eax
je 0x57c47a
movzx eax, byte [ecx]
add eax, edx
mov byte [esp + 0x60], 0
mov dword [esp + 0x58], eax
mov al, byte [ecx + 1]
mov byte [esp + 0x61], al
jmp 0x57c489
mov word [esp + 0x60], 1
mov dword [esp + 0x58], SysReAllocString
push esi
push dword [esp + 0x24]
lea eax, [esp + 0x58]
mov ecx, esi
push eax
lea eax, [esp + 0x70]
push eax
lea edx, [ebx - 1]
call fcn.0057bff0
add esp, 0x10
mov esi, dword [esp + 0x18]
cmp ebx, esi
jne 0x57c50b
cmp byte [esp + 0x12], 0
jne 0x57c4fd
mov edx, dword [esp + 0x30]
lea ecx, [edx + 8]
cmp ecx, dword [esp + 0x7c]
jb 0x57c4e5
mov ebx, dword [esp + 0x34]
mov esi, SysReAllocString
mov byte [esp + 0x12], 1
mov dword [esp + 0x24], 0
mov dword [esp + 0x18], esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], esi
jmp 0x57c50f
mov eax, dword [ecx]
sub eax, dword [edx]
add esi, eax
mov dword [esp + 0x30], ecx
mov eax, dword [ecx + 4]
sub eax, dword [edx + 4]
add dword [esp + 0x24], eax
mov dword [esp + 0x18], esi
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], esi
jmp 0x57c50f
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x38], eax
jne 0x57c56a
cmp byte [esp + 0x13], 0
jne 0x57c562
mov edx, dword [esp + 0x3c]
lea ecx, [edx + 8]
cmp ecx, dword [esp + 0x94]
jb 0x57c548
mov eax, SysReAllocString
mov byte [esp + 0x13], 1
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], 0
jmp 0x57c562
mov eax, dword [ecx]
sub eax, dword [edx]
add dword [esp + 0x1c], eax
mov eax, dword [ecx + 4]
sub eax, dword [edx + 4]
add dword [esp + 0x28], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x3c], ecx
mov edi, dword [esp + 0x40]
mov dword [esp + 0x40], eax
cmp byte [esp + 0x12], 0
je 0x57c314
cmp byte [esp + 0x13], 0
je 0x57c314
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret