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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x8c
mov eax, dword [esp + 0xa4]
and eax, 3
je 0x4ba79c
mov edi, dword [esp + 0xa0]
xor esi, esi
xor ecx, ecx
mov dword [esp + 0x7c], esi
mov eax, dword [eax*4 + 0x4fdef0]
xor edx, edx
mov dword [esp + 0x70], ecx
mov ebp, dword [edi + 0x10]
mov ebx, eax
mov dword [esp + 0x80], edi
sar ebx, 0x1f
mov dword [esp + 0x78], ebp
mov ebp, edi
add ebp, 0x14
mov dword [esp + 0x74], edx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], ebx
mov esi, dword [ebp]
xor ebx, ebx
mov eax, dword [esp + 0x68]
mov edi, dword [esp + 0x6c]
mov ecx, dword [esp + 0x68]
mul esi
imul edi, esi
imul ecx, ebx
mov dword [esp + 0x10], eax
mov eax, edx
add eax, edi
add eax, ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
add eax, dword [esp + 0x70]
adc edx, dword [esp + 0x74]
xor ebx, ebx
inc dword [esp + 0x7c]
mov dword [esp + 0x74], ebx
mov ebx, dword [esp + 0x78]
mov dword [ebp], eax
add ebp, 4
cmp dword [esp + 0x7c], ebx
mov dword [esp + 0x70], edx
jl 0x4ba70a
mov ebp, dword [esp + 0x74]
or ebp, edx
je 0x4ba78e
mov edx, dword [esp + 0xa0]
cmp dword [edx + 8], ebx
jle 0x4baaba
mov eax, dword [esp + 0x78]
mov ebp, dword [esp + 0x80]
mov ecx, dword [esp + 0x70]
mov dword [ebp + eax*4 + 0x14], ecx
inc eax
mov dword [ebp + 0x10], eax
mov esi, dword [esp + 0x80]
mov dword [esp + 0xa0], esi
mov ebx, dword [esp + 0xa4]
sar ebx, 2
mov dword [esp + 0x20], ebx
je 0x4ba9c2
mov edx, dword [0x677210]
test edx, edx
mov dword [esp + 0x84], edx
je 0x4baa5d
test byte [esp + 0x20], 1
je 0x4ba99e
mov edi, dword [esp + 0x84]
mov esi, dword [esp + 0xa0]
mov ecx, dword [edi + 0x10]
cmp dword [esi + 0x10], ecx
jge 0x4ba7ef
mov esi, edi
mov edi, dword [esp + 0xa0]
mov ebx, dword [edi + 0x10]
xor eax, eax
mov ebp, dword [esi + 0x10]
mov edx, dword [esi + 4]
mov dword [esp + 0xc], ebx
add ebx, ebp
cmp dword [esi + 8], ebx
mov dword [esp + 0x60], ebx
setl al
add eax, edx
mov dword [esp], eax
call fcn.004b9f70
mov dword [esp + 0x64], eax
add eax, 0x14
lea edx, [eax + ebx*4]
mov dword [esp + 0x24], eax
jmp 0x4ba82d
mov dword [eax], 0
add eax, 4
cmp eax, edx
jb 0x4ba824
mov ecx, dword [esp + 0xc]
add esi, 0x14
add edi, 0x14
mov dword [esp + 0x1c], esi
lea ebx, [esi + ebp*4]
mov ebp, dword [esp + 0x24]
mov dword [esp + 0x5c], ebx
lea esi, [edi + ecx*4]
cmp edi, esi
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], esi
mov dword [esp + 0x50], ebp
jae 0x4ba8fd
jmp 0x4ba870
mov edi, dword [esp + 0x58]
mov ebp, dword [edi]
add edi, 4
mov dword [esp + 0x58], edi
test ebp, ebp
je 0x4ba8ea
mov edi, dword [esp + 0x1c]
xor edx, edx
xor eax, eax
mov dword [esp + 0x48], edx
mov esi, dword [esp + 0x50]
mov dword [esp + 0x4c], eax
lea esi, [esi]
lea edi, [edi]
mov eax, dword [edi]
mov ebx, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mul ebp
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x14], edx
mov edx, dword [esi]
add dword [esp + 0x10], edx
adc dword [esp + 0x14], eax
add dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x10]
adc dword [esp + 0x14], ecx
add edi, 4
xor eax, eax
mov dword [esi], ebx
add esi, 4
cmp edi, dword [esp + 0x5c]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], edx
jb 0x4ba8a0
mov dword [esi], edx
add dword [esp + 0x50], 4
mov esi, dword [esp + 0x54]
cmp dword [esp + 0x58], esi
jb 0x4ba870
mov ebp, dword [esp + 0x60]
mov edi, dword [esp + 0x24]
test ebp, ebp
lea edx, [edi + ebp*4]
jle 0x4ba935
cmp dword [edx - 4], 0
lea eax, [edx - 4]
jne 0x4ba935
lea esi, [esi]
lea edi, [edi]
dec dword [esp + 0x60]
mov ecx, dword [esp + 0x60]
test ecx, ecx
jle 0x4ba935
sub eax, 4
mov ebx, dword [eax]
test ebx, ebx
je 0x4ba920
mov eax, dword [esp + 0xa0]
mov esi, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
test eax, eax
mov dword [edx + 0x10], esi
je 0x4ba993
mov ecx, dword [0x676890]
cmp ecx, 2
je 0x4baa11
test ecx, ecx
je 0x4bad37
cmp ecx, 1
je 0x4ba9d4
cmp ecx, 2
je 0x4baa11
mov ebx, dword [esp + 0xa0]
cmp ecx, 2
mov edx, dword [ebx + 4]
mov eax, dword [edx*4 + 0x6768d0]
mov dword [ebx], eax
mov dword [edx*4 + 0x6768d0], ebx
je 0x4baa49
mov ecx, dword [esp + 0x64]
mov dword [esp + 0xa0], ecx
sar dword [esp + 0x20], 1
je 0x4ba9c2
mov ebp, dword [esp + 0x84]
mov esi, dword [ebp]
test esi, esi
je 0x4bab75
mov dword [esp + 0x84], esi
jmp 0x4ba7c5
mov eax, dword [esp + 0xa0]
add esp, 0x8c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 1
call sub.KERNEL32.DLL_Sleep
mov ecx, dword [0x676890]
sub esp, 4
cmp ecx, 1
jne 0x4ba967
mov dword [esp], 1
call sub.KERNEL32.DLL_Sleep
mov ecx, dword [0x676890]
sub esp, 4
cmp ecx, 1
je 0x4ba9d4
jmp 0x4ba967
mov dword [esp], 0x6768a0
call sub.KERNEL32.DLL_EnterCriticalSection
mov ecx, dword [0x676890]
sub esp, 4
mov ebx, dword [esp + 0xa0]
cmp ecx, 2
mov edx, dword [ebx + 4]
mov eax, dword [edx*4 + 0x6768d0]
mov dword [ebx], eax
mov dword [edx*4 + 0x6768d0], ebx
jne 0x4ba993
mov dword [esp], 0x6768a0
call sub.KERNEL32.DLL_LeaveCriticalSection
sub esp, 4
jmp 0x4ba993
mov eax, dword [0x676890]
cmp eax, 2
je 0x4baed2
test eax, eax
je 0x4bae80
cmp eax, 1
je 0x4bae20
cmp eax, 2
je 0x4baed2
mov eax, dword [0x677210]
test eax, eax
mov dword [esp + 0x84], eax
je 0x4baf84
cmp dword [0x676890], 2
jne 0x4ba7c5
mov dword [esp], 0x6768b8
call sub.KERNEL32.DLL_LeaveCriticalSection
sub esp, 4
jmp 0x4ba7c5
mov ebx, dword [edx + 4]
inc ebx
mov dword [esp], ebx
call fcn.004b9f70
mov ecx, dword [esp + 0xa0]
mov ebp, eax
mov eax, dword [ecx + 0x10]
mov esi, ecx
add esi, 0xc
lea edx, [eax*4]
lea ecx, [edx + 8]
cmp ecx, 7
lea eax, [ebp + 0xc]
ja 0x4bae5b
cld
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0xa0]
test edx, edx
je 0x4bab69
mov ecx, dword [0x676890]
cmp ecx, 2
je 0x4baf33
test ecx, ecx
je 0x4baee6
cmp ecx, 1
jne 0x4bab36
mov dword [esp], 1
call sub.KERNEL32.DLL_Sleep
sub esp, 4
mov ecx, dword [0x676890]
cmp ecx, 1
je 0x4bab1c
cmp ecx, 2
je 0x4baf33
mov edi, dword [esp + 0xa0]
cmp ecx, 2
mov ebx, dword [esp + 0xa0]
mov esi, dword [edi + 4]
mov edx, dword [esi*4 + 0x6768d0]
mov dword [ebx], edx
mov dword [esi*4 + 0x6768d0], ebx
je 0x4baf70
mov dword [esp + 0x80], ebp
jmp 0x4ba777
mov eax, dword [0x676890]
cmp eax, 2
je 0x4babf3
test eax, eax
je 0x4badaf
cmp eax, 1
je 0x4babbf
cmp eax, 2
je 0x4babf3
mov ecx, dword [esp + 0x84]
mov esi, dword [ecx]
test esi, esi
je 0x4bac0f
cmp dword [0x676890], 2
jne 0x4ba9b6
mov dword [esp], 0x6768b8
call sub.KERNEL32.DLL_LeaveCriticalSection
sub esp, 4
jmp 0x4ba9b6
mov dword [esp], 1
call sub.KERNEL32.DLL_Sleep
mov eax, dword [0x676890]
sub esp, 4
cmp eax, 1
jne 0x4bab8c
mov dword [esp], 1
call sub.KERNEL32.DLL_Sleep
mov eax, dword [0x676890]
sub esp, 4
cmp eax, 1
je 0x4babbf
jmp 0x4bab8c
mov dword [esp], 0x6768b8
call sub.KERNEL32.DLL_EnterCriticalSection
sub esp, 4
mov ecx, dword [esp + 0x84]
mov esi, dword [ecx]
test esi, esi
jne 0x4bab9e
mov ebx, dword [ecx + 0x10]
mov edx, dword [ecx + 4]
lea ebp, [ebx + ebx]
cmp dword [ecx + 8], ebp
mov dword [esp + 0x40], ebp
setl al
movzx eax, al
add eax, edx
mov dword [esp], eax
call fcn.004b9f70
mov dword [esp + 0x44], eax
add eax, 0x14
lea edx, [eax + ebx*8]
mov dword [esp + 0x28], eax
jmp 0x4bac48
mov dword [eax], 0
add eax, 4
cmp eax, edx
jb 0x4bac3f
mov esi, dword [esp + 0x84]
add esi, 0x14
lea ebp, [esi + ebx*4]
mov dword [esp + 0x18], esi
mov ebx, dword [esp + 0x28]
cmp esi, ebp
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], ebx
jae 0x4bace9
mov edi, dword [esp + 0x3c]
add dword [esp + 0x3c], 4
mov ecx, dword [edi]
test ecx, ecx
mov dword [esp + 0x2c], ecx
je 0x4bacde
mov edi, dword [esp + 0x18]
xor eax, eax
xor edx, edx
mov dword [esp + 0x30], eax
mov esi, dword [esp + 0x38]
mov dword [esp + 0x34], edx
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mul dword [edi]
mov dword [esp + 0x10], eax
mov eax, dword [esi]
mov dword [esp + 0x14], edx
xor edx, edx
add dword [esp + 0x10], eax
adc dword [esp + 0x14], edx
add dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x10]
adc dword [esp + 0x14], ecx
add edi, 4
xor edx, edx
mov dword [esi], ebx
mov eax, dword [esp + 0x14]
add esi, 4
mov dword [esp + 0x34], edx
cmp edi, ebp
mov dword [esp + 0x30], eax
jb 0x4bac94
mov dword [esi], eax
add dword [esp + 0x38], 4
cmp dword [esp + 0x3c], ebp
jb 0x4bac6d
mov ebp, dword [esp + 0x40]
mov esi, dword [esp + 0x28]
test ebp, ebp
lea edx, [esi + ebp*4]
jle 0x4bad16
cmp dword [edx - 4], 0
lea eax, [edx - 4]
jne 0x4bad16
dec dword [esp + 0x40]
mov edi, dword [esp + 0x40]
test edi, edi
jle 0x4bad16
sub eax, 4
mov ecx, dword [eax]
test ecx, ecx
je 0x4bad01
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
mov ebx, dword [esp + 0x84]
mov esi, eax
mov dword [eax + 0x10], edx
mov dword [ebx], eax
mov dword [eax], 0
jmp 0x4bab9e
mov dword [esp], 0x676890
mov ebp, 1
mov dword [esp + 4], ebp
call sub.KERNEL32.DLL_InterlockedExchange
sub esp, 8
test eax, eax
jne 0x4bad9f
mov esi, 0x6768a0
mov ebx, 1
mov dword [esp], esi
add esi, 0x18
call sub.KERNEL32.DLL_InitializeCriticalSection
sub esp, 4
dec ebx
jns 0x4bad5d
mov dword [esp], 0x4b9f10
call fcn.004012d0
mov dword [esp], 0x6768a0
mov edi, 2
mov dword [0x676890], edi
call sub.KERNEL32.DLL_EnterCriticalSection
mov ecx, dword [0x676890]
sub esp, 4
jmp 0x4baa26
cmp eax, 2
je 0x4bad7a
mov ecx, dword [0x676890]
jmp 0x4ba962
mov dword [esp], 0x676890
mov esi, 1
mov dword [esp + 4], esi
call sub.KERNEL32.DLL_InterlockedExchange
sub esp, 8
test eax, eax
jne 0x4bae11
mov esi, 0x6768a0
mov ebx, 1
mov dword [esp], esi
add esi, 0x18
call sub.KERNEL32.DLL_InitializeCriticalSection
sub esp, 4
dec ebx
jns 0x4badd5
mov dword [esp], 0x4b9f10
call fcn.004012d0
mov dword [esp], 0x6768b8
mov edi, 2
mov dword [0x676890], edi
call sub.KERNEL32.DLL_EnterCriticalSection
sub esp, 4
jmp 0x4bac02
cmp eax, 2
je 0x4badf2
mov eax, dword [0x676890]
jmp 0x4bab87
mov dword [esp], 1
call sub.KERNEL32.DLL_Sleep
mov eax, dword [0x676890]
sub esp, 4
cmp eax, 1
jne 0x4baa7c
mov dword [esp], 1
call sub.KERNEL32.DLL_Sleep
mov eax, dword [0x676890]
sub esp, 4
cmp eax, 1
je 0x4bae20
jmp 0x4baa7c
test al, 4
je 0x4baaed
mov edi, dword [esp + 0xa0]
lea eax, [ebp + 0x10]
lea ecx, [edx + 4]
mov esi, dword [edi + 0xc]
mov dword [ebp + 0xc], esi
mov esi, edi
add esi, 0x10
jmp 0x4baaed
mov dword [esp], 0x676890
mov edi, 1
mov dword [esp + 4], edi
call sub.KERNEL32.DLL_InterlockedExchange
sub esp, 8
test eax, eax
jne 0x4baf4d
mov esi, 0x6768a0
mov ebx, 1
mov dword [esp], esi
add esi, 0x18
call sub.KERNEL32.DLL_InitializeCriticalSection
sub esp, 4
dec ebx
jns 0x4baeaa
mov dword [esp], 0x4b9f10
call fcn.004012d0
mov ebp, 2
mov dword [0x676890], ebp
mov dword [esp], 0x6768b8
call sub.KERNEL32.DLL_EnterCriticalSection
sub esp, 4
jmp 0x4baa85
mov dword [esp], 0x676890
mov ecx, 1
mov dword [esp + 4], ecx
call sub.KERNEL32.DLL_InterlockedExchange
sub esp, 8
test eax, eax
jne 0x4baf60
mov esi, 0x6768a0
mov ebx, 1
mov dword [esp], esi
add esi, 0x18
call sub.KERNEL32.DLL_InitializeCriticalSection
sub esp, 4
dec ebx
jns 0x4baf0c
mov dword [esp], 0x4b9f10
call fcn.004012d0
mov eax, 2
mov dword [0x676890], eax
mov dword [esp], 0x6768a0
call sub.KERNEL32.DLL_EnterCriticalSection
mov ecx, dword [0x676890]
sub esp, 4
jmp 0x4bab3f
cmp eax, 2
je 0x4baec7
mov eax, dword [0x676890]
jmp 0x4baa73
cmp eax, 2
jne 0x4bab2b
jmp 0x4baf29
mov dword [esp], 0x6768a0
call sub.KERNEL32.DLL_LeaveCriticalSection
sub esp, 4
jmp 0x4bab69
mov dword [esp], 1
call fcn.004b9f70
mov dword [0x677210], eax
mov dword [eax + 0x14], 0x271
mov dword [eax + 0x10], 1
mov dword [esp + 0x84], eax
mov dword [eax], 0
jmp 0x4baa99