Function at 0x52b870
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 0x52b95c
mov edi, dword [esp + 0xa0]
xor esi, esi
xor ecx, ecx
mov dword [esp + 0x7c], esi
mov eax, dword [eax*4 + 0x59dac0]
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 0x52b8ca
mov ebp, dword [esp + 0x74]
or ebp, edx
je 0x52b94e
mov edx, dword [esp + 0xa0]
cmp dword [edx + 8], ebx
jle 0x52bc7a
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 0x52bb82
mov edx, dword [0x6314c0]
test edx, edx
mov dword [esp + 0x84], edx
je 0x52bc1d
test byte [esp + 0x20], 1
je 0x52bb5e
mov edi, dword [esp + 0x84]
mov esi, dword [esp + 0xa0]
mov ecx, dword [edi + 0x10]
cmp dword [esi + 0x10], ecx
jge 0x52b9af
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.0052b130
mov dword [esp + 0x64], eax
add eax, 0x14
lea edx, [eax + ebx*4]
mov dword [esp + 0x24], eax
jmp 0x52b9ed
mov dword [eax], 0
add eax, 4
cmp eax, edx
jb 0x52b9e4
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 0x52babd
jmp 0x52ba30
mov edi, dword [esp + 0x58]
mov ebp, dword [edi]
add edi, 4
mov dword [esp + 0x58], edi
test ebp, ebp
je 0x52baaa
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 0x52ba60
mov dword [esi], edx
add dword [esp + 0x50], 4
mov esi, dword [esp + 0x54]
cmp dword [esp + 0x58], esi
jb 0x52ba30
mov ebp, dword [esp + 0x60]
mov edi, dword [esp + 0x24]
test ebp, ebp
lea edx, [edi + ebp*4]
jle 0x52baf5
cmp dword [edx - 4], 0
lea eax, [edx - 4]
jne 0x52baf5
lea esi, [esi]
lea edi, [edi]
dec dword [esp + 0x60]
mov ecx, dword [esp + 0x60]
test ecx, ecx
jle 0x52baf5
sub eax, 4
mov ebx, dword [eax]
test ebx, ebx
je 0x52bae0
mov eax, dword [esp + 0xa0]
mov esi, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
test eax, eax
mov dword [edx + 0x10], esi
je 0x52bb53
mov ecx, dword [0x630b40]
cmp ecx, 2
je 0x52bbd1
test ecx, ecx
je 0x52bef7
cmp ecx, 1
je 0x52bb94
cmp ecx, 2
je 0x52bbd1
mov ebx, dword [esp + 0xa0]
cmp ecx, 2
mov edx, dword [ebx + 4]
mov eax, dword [edx*4 + 0x630b80]
mov dword [ebx], eax
mov dword [edx*4 + 0x630b80], ebx
je 0x52bc09
mov ecx, dword [esp + 0x64]
mov dword [esp + 0xa0], ecx
sar dword [esp + 0x20], 1
je 0x52bb82
mov ebp, dword [esp + 0x84]
mov esi, dword [ebp]
test esi, esi
je 0x52bd35
mov dword [esp + 0x84], esi
jmp 0x52b985
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 [0x630b40]
sub esp, 4
cmp ecx, 1
jne 0x52bb27
mov dword [esp], 1
call sub.KERNEL32.DLL_Sleep
mov ecx, dword [0x630b40]
sub esp, 4
cmp ecx, 1
je 0x52bb94
jmp 0x52bb27
mov dword [esp], 0x630b50
call sub.KERNEL32.DLL_EnterCriticalSection
mov ecx, dword [0x630b40]
sub esp, 4
mov ebx, dword [esp + 0xa0]
cmp ecx, 2
mov edx, dword [ebx + 4]
mov eax, dword [edx*4 + 0x630b80]
mov dword [ebx], eax
mov dword [edx*4 + 0x630b80], ebx
jne 0x52bb53
mov dword [esp], 0x630b50
call sub.KERNEL32.DLL_LeaveCriticalSection
sub esp, 4
jmp 0x52bb53
mov eax, dword [0x630b40]
cmp eax, 2
je 0x52c092
test eax, eax
je 0x52c040
cmp eax, 1
je 0x52bfe0
cmp eax, 2
je 0x52c092
mov eax, dword [0x6314c0]
test eax, eax
mov dword [esp + 0x84], eax
je 0x52c144
cmp dword [0x630b40], 2
jne 0x52b985
mov dword [esp], 0x630b68
call sub.KERNEL32.DLL_LeaveCriticalSection
sub esp, 4
jmp 0x52b985
mov ebx, dword [edx + 4]
inc ebx
mov dword [esp], ebx
call fcn.0052b130
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 0x52c01b
cld
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0xa0]
test edx, edx
je 0x52bd29
mov ecx, dword [0x630b40]
cmp ecx, 2
je 0x52c0f3
test ecx, ecx
je 0x52c0a6
cmp ecx, 1
jne 0x52bcf6
mov dword [esp], 1
call sub.KERNEL32.DLL_Sleep
sub esp, 4
mov ecx, dword [0x630b40]
cmp ecx, 1
je 0x52bcdc
cmp ecx, 2
je 0x52c0f3
mov edi, dword [esp + 0xa0]
cmp ecx, 2
mov ebx, dword [esp + 0xa0]
mov esi, dword [edi + 4]
mov edx, dword [esi*4 + 0x630b80]
mov dword [ebx], edx
mov dword [esi*4 + 0x630b80], ebx
je 0x52c130
mov dword [esp + 0x80], ebp
jmp 0x52b937
mov eax, dword [0x630b40]
cmp eax, 2
je 0x52bdb3
test eax, eax
je 0x52bf6f
cmp eax, 1
je 0x52bd7f
cmp eax, 2
je 0x52bdb3
mov ecx, dword [esp + 0x84]
mov esi, dword [ecx]
test esi, esi
je 0x52bdcf
cmp dword [0x630b40], 2
jne 0x52bb76
mov dword [esp], 0x630b68
call sub.KERNEL32.DLL_LeaveCriticalSection
sub esp, 4
jmp 0x52bb76
mov dword [esp], 1
call sub.KERNEL32.DLL_Sleep
mov eax, dword [0x630b40]
sub esp, 4
cmp eax, 1
jne 0x52bd4c
mov dword [esp], 1
call sub.KERNEL32.DLL_Sleep
mov eax, dword [0x630b40]
sub esp, 4
cmp eax, 1
je 0x52bd7f
jmp 0x52bd4c
mov dword [esp], 0x630b68
call sub.KERNEL32.DLL_EnterCriticalSection
sub esp, 4
mov ecx, dword [esp + 0x84]
mov esi, dword [ecx]
test esi, esi
jne 0x52bd5e
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.0052b130
mov dword [esp + 0x44], eax
add eax, 0x14
lea edx, [eax + ebx*8]
mov dword [esp + 0x28], eax
jmp 0x52be08
mov dword [eax], 0
add eax, 4
cmp eax, edx
jb 0x52bdff
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 0x52bea9
mov edi, dword [esp + 0x3c]
add dword [esp + 0x3c], 4
mov ecx, dword [edi]
test ecx, ecx
mov dword [esp + 0x2c], ecx
je 0x52be9e
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 0x52be54
mov dword [esi], eax
add dword [esp + 0x38], 4
cmp dword [esp + 0x3c], ebp
jb 0x52be2d
mov ebp, dword [esp + 0x40]
mov esi, dword [esp + 0x28]
test ebp, ebp
lea edx, [esi + ebp*4]
jle 0x52bed6
cmp dword [edx - 4], 0
lea eax, [edx - 4]
jne 0x52bed6
dec dword [esp + 0x40]
mov edi, dword [esp + 0x40]
test edi, edi
jle 0x52bed6
sub eax, 4
mov ecx, dword [eax]
test ecx, ecx
je 0x52bec1
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 0x52bd5e
mov dword [esp], 0x630b40
mov ebp, 1
mov dword [esp + 4], ebp
call sub.KERNEL32.DLL_InterlockedExchange
sub esp, 8
test eax, eax
jne 0x52bf5f
mov esi, 0x630b50
mov ebx, 1
mov dword [esp], esi
add esi, 0x18
call sub.KERNEL32.DLL_InitializeCriticalSection
sub esp, 4
dec ebx
jns 0x52bf1d
mov dword [esp], 0x52b0d0
call fcn.004012d0
mov dword [esp], 0x630b50
mov edi, 2
mov dword [0x630b40], edi
call sub.KERNEL32.DLL_EnterCriticalSection
mov ecx, dword [0x630b40]
sub esp, 4
jmp 0x52bbe6
cmp eax, 2
je 0x52bf3a
mov ecx, dword [0x630b40]
jmp 0x52bb22
mov dword [esp], 0x630b40
mov esi, 1
mov dword [esp + 4], esi
call sub.KERNEL32.DLL_InterlockedExchange
sub esp, 8
test eax, eax
jne 0x52bfd1
mov esi, 0x630b50
mov ebx, 1
mov dword [esp], esi
add esi, 0x18
call sub.KERNEL32.DLL_InitializeCriticalSection
sub esp, 4
dec ebx
jns 0x52bf95
mov dword [esp], 0x52b0d0
call fcn.004012d0
mov dword [esp], 0x630b68
mov edi, 2
mov dword [0x630b40], edi
call sub.KERNEL32.DLL_EnterCriticalSection
sub esp, 4
jmp 0x52bdc2
cmp eax, 2
je 0x52bfb2
mov eax, dword [0x630b40]
jmp 0x52bd47
mov dword [esp], 1
call sub.KERNEL32.DLL_Sleep
mov eax, dword [0x630b40]
sub esp, 4
cmp eax, 1
jne 0x52bc3c
mov dword [esp], 1
call sub.KERNEL32.DLL_Sleep
mov eax, dword [0x630b40]
sub esp, 4
cmp eax, 1
je 0x52bfe0
jmp 0x52bc3c
test al, 4
je 0x52bcad
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 0x52bcad
mov dword [esp], 0x630b40
mov edi, 1
mov dword [esp + 4], edi
call sub.KERNEL32.DLL_InterlockedExchange
sub esp, 8
test eax, eax
jne 0x52c10d
mov esi, 0x630b50
mov ebx, 1
mov dword [esp], esi
add esi, 0x18
call sub.KERNEL32.DLL_InitializeCriticalSection
sub esp, 4
dec ebx
jns 0x52c06a
mov dword [esp], 0x52b0d0
call fcn.004012d0
mov ebp, 2
mov dword [0x630b40], ebp
mov dword [esp], 0x630b68
call sub.KERNEL32.DLL_EnterCriticalSection
sub esp, 4
jmp 0x52bc45
mov dword [esp], 0x630b40
mov ecx, 1
mov dword [esp + 4], ecx
call sub.KERNEL32.DLL_InterlockedExchange
sub esp, 8
test eax, eax
jne 0x52c120
mov esi, 0x630b50
mov ebx, 1
mov dword [esp], esi
add esi, 0x18
call sub.KERNEL32.DLL_InitializeCriticalSection
sub esp, 4
dec ebx
jns 0x52c0cc
mov dword [esp], 0x52b0d0
call fcn.004012d0
mov eax, 2
mov dword [0x630b40], eax
mov dword [esp], 0x630b50
call sub.KERNEL32.DLL_EnterCriticalSection
mov ecx, dword [0x630b40]
sub esp, 4
jmp 0x52bcff
cmp eax, 2
je 0x52c087
mov eax, dword [0x630b40]
jmp 0x52bc33
cmp eax, 2
jne 0x52bceb
jmp 0x52c0e9
mov dword [esp], 0x630b50
call sub.KERNEL32.DLL_LeaveCriticalSection
sub esp, 4
jmp 0x52bd29
mov dword [esp], 1
call fcn.0052b130
mov dword [0x6314c0], eax
mov dword [eax + 0x14], 0x271
mov dword [eax + 0x10], 1
mov dword [esp + 0x84], eax
mov dword [eax], 0
jmp 0x52bc59