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

Disassembly:
sub esp, 0x78
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebx + 0x24]
cmp edi, dword [ebx + 0x28]
je 0x5218c0
push ebp
push esi
xor edx, edx
mov esi, 0x9c
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x1c], eax
cmp eax, dword [ebx + 0x1c]
je 0x5218b2
mov eax, dword [eax]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edx
mov ecx, dword [eax + 0xd8]
mov dword [esp + 0x20], ecx
mov eax, dword [ecx + 8]
sub eax, dword [ecx + 4]
cdq
idiv esi
test eax, eax
je 0x52189b
xor eax, eax
mov ebp, 0x9c
mov dword [esp + 0x14], eax
mov esi, dword [ecx + 4]
mov ecx, edi
add esi, eax
lea eax, [esi + 0x34]
push eax
call fcn.004392c2
test eax, eax
jne 0x521870
mov ebp, dword [edi + 0x18]
xor ecx, ecx
mov eax, dword [esi + 0xc]
cmp ebp, dword [esi + 8]
jne 0x521723
cmp ecx, eax
jne 0x521725
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x68], eax
mov eax, dword [esi]
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x60]
push eax
mov dword [esp + 0x68], ebp
lea eax, [esp + 0x28]
lea ebp, [ebx + 0x44]
mov byte [esp + 0x74], 2
mov esi, dword [ebp]
mov ecx, ebp
push eax
call fcn.00522ad5
cmp dword [eax], esi
jne 0x52186b
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x3c]
jmp 0x521863
cmp ecx, eax
jb 0x5217d3
ja 0x521736
cmp ebp, dword [esi + 8]
jbe 0x5217d3
mov ecx, dword [esi + 8]
mov eax, dword [esp + 0x10]
mov edx, dword [edi + 0x1c]
mov dword [esp + 0x68], eax
mov eax, dword [esi]
mov dword [esp + 0x60], edx
sub edx, ecx
mov dword [esp + 0x6c], eax
add edx, ebp
mov dword [esp + 0x80], eax
lea ebp, [ebx + 0x44]
mov esi, dword [ebp]
lea eax, [esp + 0x60]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x78], ecx
mov ecx, dword [esp + 0x10]
push eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x80], ecx
push eax
mov ecx, ebp
mov byte [esp + 0x78], 0
mov dword [esp + 0x7c], edx
mov byte [esp + 0x8c], 1
call fcn.00522ad5
cmp dword [eax], esi
jne 0x5217a9
lea eax, [esp + 0x60]
mov ecx, ebp
push eax
lea eax, [esp + 0x44]
push eax
call fcn.005208fa
mov esi, dword [ebp]
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x30]
mov ecx, ebp
push eax
call fcn.00522ad5
cmp dword [eax], esi
jne 0x52186b
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x4c]
jmp 0x521863
mov eax, dword [edi + 0x1c]
mov ecx, dword [esi]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x74], eax
mov dword [esp + 0x60], eax
mov eax, dword [esi + 8]
sub eax, ebp
mov dword [esp + 0x78], ebp
add eax, ecx
mov dword [esp + 0x64], ebp
mov dword [esp + 0x6c], eax
lea ebp, [ebx + 0x44]
mov esi, dword [ebp]
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x34]
mov dword [esp + 0x84], ecx
push eax
mov ecx, ebp
mov dword [esp + 0x84], edx
mov byte [esp + 0x8c], 0
mov dword [esp + 0x70], edx
mov byte [esp + 0x78], 1
call fcn.00522ad5
cmp dword [eax], esi
jne 0x521842
lea eax, [esp + 0x74]
mov ecx, ebp
push eax
lea eax, [esp + 0x54]
push eax
call fcn.005208fa
mov esi, dword [ebp]
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x38]
mov ecx, ebp
push eax
call fcn.00522ad5
cmp dword [eax], esi
jne 0x52186b
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x5c]
push eax
mov ecx, ebp
call fcn.005208fa
mov ebp, 0x9c
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
add dword [esp + 0x14], ebp
inc esi
mov dword [esp + 0x18], esi
mov eax, dword [ecx + 8]
sub eax, dword [ecx + 4]
cdq
idiv ebp
cmp esi, eax
mov eax, dword [esp + 0x14]
jb 0x5216af
mov esi, 0x9c
mov eax, dword [esp + 0x1c]
add eax, 4
push 0
mov dword [esp + 0x20], eax
pop edx
cmp eax, dword [ebx + 0x1c]
jne 0x52167f
add edi, 0x20
cmp edi, dword [ebx + 0x28]
jne 0x52166f
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x78
ret