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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x775e77
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
push ebx
push esi
push edi
mov eax, dword [0x867e6c]
xor eax, esp
push eax
lea eax, [esp + 0xf0]
mov dword fs:[0], eax
push fcn.0041b120
push fcn.00401ff0
push 5
push 0x18
lea eax, [esp + 0x84]
push eax
mov dword [esp + 0x38], 0xffffffff
call fcn.00644b0e
mov ecx, dword [ebp + 8]
xor edx, edx
mov dword [esp + 0xf8], edx
mov eax, dword [ecx + 0x3710]
inc eax
cmp eax, 5
mov dword [esp + 0x18], 5
jg 0x6ba579
mov dword [esp + 0x18], eax
lea eax, [ecx + 0x323c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], eax
xor eax, eax
lea esi, [esp + 0x80]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x28], edx
mov ebx, dword [esp + 0x20]
add ebx, 0xfffffffc
cmp dword [ebx + 8], 1
jne 0x6ba61c
mov dword [esp + 0x1c], 0
lea ebx, [esi - 0xc]
mov ecx, dword [esi]
test ecx, ecx
jne 0x6ba5ca
xor eax, eax
jmp 0x6ba5d2
mov eax, dword [ebx + 0x14]
sub eax, ecx
sar eax, 2
mov edi, dword [ebx + 0x10]
mov edx, edi
sub edx, ecx
sar edx, 2
cmp edx, eax
jae 0x6ba5ee
mov eax, dword [esp + 0x1c]
mov dword [edi], eax
add edi, 4
mov dword [ebx + 0x10], edi
jmp 0x6ba60c
cmp ecx, edi
jbe 0x6ba5f7
call fcn.006441b7
mov eax, dword [ebx]
push edi
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x78]
push edx
mov eax, ebx
call fcn.004024a0
mov eax, dword [esp + 0x1c]
inc eax
cmp eax, 7
mov dword [esp + 0x1c], eax
jl 0x6ba5c0
jmp 0x6ba632
lea edi, [esi - 0xc]
call fcn.00402070
mov ebx, dword [esp + 0x20]
cmp dword [ebx], 0xffffffff
jle 0x6ba632
call fcn.00402070
mov eax, dword [esi + 4]
sub eax, dword [esi]
sar eax, 2
test eax, eax
ja 0x6ba643
call fcn.006441b7
mov eax, dword [esi]
mov edx, dword [esi + 4]
mov ecx, dword [eax]
mov edi, dword [esp + 0x28]
sub edx, eax
sar edx, 2
mov dword [esp + edi + 0x44], ecx
test edx, edx
ja 0x6ba660
call fcn.006441b7
mov eax, dword [esi]
mov ecx, dword [eax]
add dword [esp + 0x20], 0xf8
mov dword [esp + edi + 0x58], ecx
add edi, 4
add esi, 0x18
cmp edi, 0x14
mov dword [esp + 0x28], edi
jl 0x6ba5a8
mov byte [esp + 0x17], 0
jmp 0x6ba690
lea edx, [esp + 0x44]
call fcn.006ba280
cmp eax, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
jle 0x6ba6b7
mov dword [esp + 0x24], eax
test edx, edx
jle 0x6ba6b7
mov ecx, edx
lea esi, [esp + 0x44]
lea edi, [esp + 0x58]
rep movsd dword es:[edi], dword [esi]
xor edi, edi
xor eax, eax
cmp edx, edi
jle 0x6ba72a
lea ecx, [esp + 0x80]
mov esi, dword [ecx + 4]
sub esi, dword [ecx]
sar esi, 2
dec esi
cmp dword [esp + eax*4 + 0x30], esi
jl 0x6ba6ef
lea esi, [edx - 1]
mov dword [esp + eax*4 + 0x30], edi
cmp eax, esi
jne 0x6ba6e5
mov byte [esp + 0x17], 1
inc eax
add ecx, 0x18
cmp eax, edx
jl 0x6ba6c6
jmp 0x6ba6f7
inc dword [esp + eax*4 + 0x30]
lea eax, [esp + eax*4 + 0x30]
cmp edx, edi
jle 0x6ba72a
lea ebx, [esp + 0x80]
mov edx, dword [ebx + 4]
sub edx, dword [ebx]
mov esi, dword [esp + edi*4 + 0x30]
sar edx, 2
cmp esi, edx
jb 0x6ba717
call fcn.006441b7
mov eax, dword [ebx]
mov ecx, dword [eax + esi*4]
mov dword [esp + edi*4 + 0x44], ecx
inc edi
add ebx, 0x18
cmp edi, dword [esp + 0x18]
jl 0x6ba702
cmp byte [esp + 0x17], 0
je 0x6ba690
mov edx, dword [ebp + 8]
mov ebx, 1
cmp dword [edx + 0x3710], ebx
jle 0x6ba77e
mov edi, dword [esp + 0x18]
xor ecx, ecx
test edi, edi
jle 0x6ba77e
mov eax, dword [esp + 0x2c]
cmp dword [eax + 4], ebx
jne 0x6ba75e
mov edx, dword [esp + ecx*4 + 0x58]
jmp 0x6ba770
mov edx, dword [eax]
cmp edx, 0xffffffff
jle 0x6ba773
cmp dword [esp + ecx*4 + 0x58], edx
jne 0x6ba773
mov esi, dword [eax - 4]
mov dword [eax], esi
mov dword [eax - 4], edx
add ecx, ebx
add eax, 0xf8
cmp ecx, edi
jl 0x6ba753
push fcn.0041b120
push 5
push 0x18
lea eax, [esp + 0x80]
push eax
mov dword [esp + 0x108], 0xffffffff
call fcn.0064441b
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0xf0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4