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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
xor eax, eax
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x14]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x94]
xor edx, edx
div dword [esi + 0x98]
or byte [esi + 0x14], 4
mov edx, dword [edi + 0x18]
lea ecx, [edx - 1]
lea ebx, [eax - 1]
not ebx
and ebx, ecx
mov ecx, dword [esi + 0x18]
inc ebx
cmp edx, ecx
jbe 0x4ba5ee
mov edi, edx
sub edi, ebx
inc edi
mov dword [esp + 0xc], edi
jmp 0x4ba607
lea edx, [ebx + eax - 1]
cmp edx, ecx
jbe 0x4ba601
sub ecx, ebx
inc ecx
mov dword [esp + 0xc], ecx
mov edi, ecx
jmp 0x4ba607
mov dword [esp + 0xc], eax
mov edi, eax
mov dword [esp + 0x1c], 0
test edi, edi
jle 0x4ba7fa
mov edi, ebx
lea esp, [esp]
cmp dword [esp + 0x10], 0
jne 0x4ba7fa
mov eax, dword [ebp + 8]
cmp edi, dword [eax + 0x18]
je 0x4ba6a6
mov ecx, dword [esi + 0x38]
test ecx, ecx
je 0x4ba6a6
mov eax, edi
call fcn.004b40b0
test eax, eax
je 0x4ba6a6
mov eax, dword [esi + 0xd4]
mov ecx, dword [eax + 0x2c]
push 0
push edi
push ecx
call dword [0x6319b4]
add esp, 0xc
test eax, eax
je 0x4ba688
mov ecx, dword [eax + 4]
cmp dword [ecx], 0
mov edx, dword [esi + 0xd4]
jne 0x4ba67a
push eax
push edi
push edx
call fcn.004b4990
add esp, 0xc
jmp 0x4ba688
mov eax, 1
add dword [edx + 0xc], eax
add word [ecx + 0x1e], ax
mov eax, ecx
mov dword [esp + 0x14], eax
test eax, eax
je 0x4ba708
movzx ecx, word [eax + 0x1c]
test cl, 8
je 0x4ba6a1
mov dword [esp + 0x18], 1
test cl, 0x20
jmp 0x4ba6f8
mov eax, dword [0x631a40]
cdq
idiv dword [esi + 0x98]
inc eax
cmp edi, eax
je 0x4ba708
mov eax, dword [esi + 0xcc]
push 0
lea edx, [esp + 0x18]
push edx
push edi
push esi
call eax
add esp, 0x10
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4ba708
mov eax, dword [esp + 0x14]
call fcn.004ba4e0
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
movzx edx, word [eax + 0x1c]
test dl, 8
je 0x4ba6f5
mov dword [esp + 0x18], 1
test dl, 0x20
je 0x4ba703
mov ecx, eax
call fcn.004b8a90
jmp 0x4ba708
call fcn.004b4a10
mov eax, dword [esp + 0x1c]
inc eax
inc edi
cmp eax, dword [esp + 0xc]
mov dword [esp + 0x1c], eax
jl 0x4ba620
cmp dword [esp + 0x10], 0
jne 0x4ba7fa
cmp dword [esp + 0x18], 0
je 0x4ba7fa
mov ecx, dword [esp + 0xc]
mov edi, ebx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], ecx
mov eax, dword [esi + 0xd4]
mov edx, dword [eax + 0x2c]
push 0
push edi
push edx
call dword [0x6319b4]
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x4ba7ea
mov eax, dword [ecx + 4]
cmp dword [eax], 0
mov edx, dword [esi + 0xd4]
jne 0x4ba77b
push ecx
push edi
push edx
call fcn.004b4990
add esp, 0xc
jmp 0x4ba787
mov ecx, 1
add dword [edx + 0xc], ecx
add word [eax + 0x1e], cx
test eax, eax
je 0x4ba7ea
or word [eax + 0x1c], 8
movzx ecx, word [eax + 0x1c]
test cl, 0x20
je 0x4ba7e5
mov ecx, dword [eax + 0x14]
dec dword [ecx + 0x78]
mov edx, dword [ecx + 0x88]
mov dword [eax + 0x10], edx
mov edi, dword [ecx + 0x3c]
mov dword [ecx + 0x88], eax
mov edx, dword [eax + 4]
mov eax, dword [eax + 0x18]
mov ebx, dword [edi]
dec eax
push edx
mov dword [esp + 0x18], eax
mov eax, dword [ecx + 0x98]
cdq
push edx
push eax
mov eax, dword [esp + 0x20]
push 0
push eax
call fcn.0058da40
push edx
push eax
mov eax, dword [ebx + 0x48]
push edi
call eax
mov edi, dword [esp + 0x2c]
add esp, 0x10
jmp 0x4ba7ea
call fcn.004b4a10
inc edi
sub dword [esp + 0x18], 1
mov dword [esp + 0x1c], edi
jne 0x4ba740
and byte [esi + 0x14], 0xfb
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret