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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebx + 4]
mov dword [ebp + 8], edi
test esi, esi
js 0x5ba045
cmp esi, 2
jl 0x5ba05d
mov eax, dword [ebx]
mov dword [eax + 0x14], 0xf
mov ecx, dword [ebx]
mov dword [ecx + 0x18], esi
mov edx, dword [ebx]
mov eax, dword [edx]
push ebx
call eax
add esp, 4
cmp esi, 1
jne 0x5ba0bf
mov esi, dword [edi + 0x44]
test esi, esi
je 0x5ba087
cmp byte [esi + 0x22], 0
je 0x5ba080
mov edx, dword [esi + 0x30]
lea ecx, [esi + 0x28]
push ecx
push ebx
mov byte [esi + 0x22], 0
call edx
add esp, 8
mov esi, dword [esi + 0x24]
test esi, esi
jne 0x5ba069
mov esi, dword [edi + 0x48]
mov dword [edi + 0x44], 0
test esi, esi
je 0x5ba0b5
mov edi, edi
cmp byte [esi + 0x22], 0
je 0x5ba0ae
mov ecx, dword [esi + 0x30]
lea eax, [esi + 0x28]
push eax
push ebx
mov byte [esi + 0x22], 0
call ecx
add esp, 8
mov esi, dword [esi + 0x24]
test esi, esi
jne 0x5ba097
mov esi, dword [ebp + 0xc]
mov dword [edi + 0x48], 0
mov ebx, dword [edi + esi*4 + 0x3c]
mov eax, dword [ebp + 0xc]
mov dword [edi + eax*4 + 0x3c], 0
test ebx, ebx
je 0x5ba1d2
mov edx, dword [ebx]
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x10], edx
lea edx, [eax + ecx + 0x10]
mov eax, dword [0x6a2f74]
mov dword [ebp - 4], edx
cmp eax, 1
je 0x5ba118
add eax, 0xfffffffe
push ebx
cmp eax, 1
ja 0x5ba10e
mov eax, dword [0x69f4c8]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5ba1be
call fcn.00403b21
jmp 0x5ba1bb
mov edx, dword [0x69f4cc]
not edx
and edx, ebx
mov dword [ebp - 8], edx
cmp edx, ebx
je 0x5ba1b5
mov ecx, dword [0x69f528]
mov esi, dword [edx]
mov edi, ebx
sub edi, edx
mov eax, edi
shr eax, cl
push esi
lea ecx, [eax + eax*2]
test byte [edx + ecx*4 + 0x18], 2
lea eax, [edx + ecx*4 + 0x10]
mov dword [ebp - 0xc], eax
jne 0x5ba172
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
push ebx
push edx
push esi
call fcn.0055e3dc
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp + 8]
jmp 0x5ba1be
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x69f528]
mov edx, dword [ebp - 8]
shr edi, cl
mov ecx, dword [0x69f5ac]
not ecx
push ebx
lea eax, [edi + edi*2 + 6]
mov eax, dword [edx + eax*4]
and eax, ecx
sub dword [esi + 0x68], eax
add dword [esi + 0x78], 1
push esi
adc dword [esi + 0x7c], 0
call fcn.0055dd11
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp + 8]
jmp 0x5ba1be
push ebx
call fcn.0055eb7c
add esp, 4
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
sub dword [edi + 0x4c], ecx
test ebx, ebx
jne 0x5ba0d6
mov eax, dword [ebp + 0xc]
mov ebx, dword [edi + eax*4 + 0x34]
mov dword [edi + eax*4 + 0x34], 0
test ebx, ebx
je 0x5ba2df
mov edx, dword [ebx]
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
mov dword [ebp - 0xc], edx
lea edx, [eax + ecx + 0x10]
mov eax, dword [0x6a2f74]
mov dword [ebp - 4], edx
cmp eax, 1
je 0x5ba228
add eax, 0xfffffffe
push ebx
cmp eax, 1
ja 0x5ba21e
mov eax, dword [0x69f4c8]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5ba2ce
call fcn.00403b21
jmp 0x5ba2cb
mov edx, dword [0x69f4cc]
not edx
and edx, ebx
mov dword [ebp + 0xc], edx
cmp edx, ebx
je 0x5ba2c5
mov ecx, dword [0x69f528]
mov esi, dword [edx]
mov edi, ebx
sub edi, edx
mov eax, edi
shr eax, cl
push esi
lea ecx, [eax + eax*2]
test byte [edx + ecx*4 + 0x18], 2
lea eax, [edx + ecx*4 + 0x10]
mov dword [ebp - 0x10], eax
jne 0x5ba282
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
push ebx
push edx
push esi
call fcn.0055e3dc
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp + 8]
jmp 0x5ba2ce
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x69f528]
mov edx, dword [ebp + 0xc]
shr edi, cl
mov ecx, dword [0x69f5ac]
not ecx
push ebx
lea eax, [edi + edi*2 + 6]
mov eax, dword [edx + eax*4]
and eax, ecx
sub dword [esi + 0x68], eax
add dword [esi + 0x78], 1
push esi
adc dword [esi + 0x7c], 0
call fcn.0055dd11
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp + 8]
jmp 0x5ba2ce
push ebx
call fcn.0055eb7c
add esp, 4
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp - 0xc]
sub dword [edi + 0x4c], ecx
test ebx, ebx
jne 0x5ba1e6
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret