Function at 0x5204a8
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 0x520715
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 0x520707
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 0x5206f0
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.00438e88
test eax, eax
jne 0x5206c5
mov ebp, dword [edi + 0x18]
xor ecx, ecx
mov eax, dword [esi + 0xc]
cmp ebp, dword [esi + 8]
jne 0x520578
cmp ecx, eax
jne 0x52057a
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.0052192a
cmp dword [eax], esi
jne 0x5206c0
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x3c]
jmp 0x5206b8
cmp ecx, eax
jb 0x520628
ja 0x52058b
cmp ebp, dword [esi + 8]
jbe 0x520628
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.0052192a
cmp dword [eax], esi
jne 0x5205fe
lea eax, [esp + 0x60]
mov ecx, ebp
push eax
lea eax, [esp + 0x44]
push eax
call fcn.0051f7d3
mov esi, dword [ebp]
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x30]
mov ecx, ebp
push eax
call fcn.0052192a
cmp dword [eax], esi
jne 0x5206c0
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x4c]
jmp 0x5206b8
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.0052192a
cmp dword [eax], esi
jne 0x520697
lea eax, [esp + 0x74]
mov ecx, ebp
push eax
lea eax, [esp + 0x54]
push eax
call fcn.0051f7d3
mov esi, dword [ebp]
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x38]
mov ecx, ebp
push eax
call fcn.0052192a
cmp dword [eax], esi
jne 0x5206c0
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x5c]
push eax
mov ecx, ebp
call fcn.0051f7d3
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 0x520504
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 0x5204d4
add edi, 0x20
cmp edi, dword [ebx + 0x28]
jne 0x5204c4
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x78
ret