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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x52141c
sub esp, 0x50
mov eax, dword [esp + 0x6c]
test eax, eax
jne 0x5212ba
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x64]
cmp ecx, edx
jne 0x5211d3
test ecx, ecx
je 0x5211c9
mov ebx, dword [esp + 0x54]
mov ebp, dword [esp + 0x60]
cmp ebx, ebp
jne 0x5211db
mov eax, dword [esp + 0x54]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], ecx
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x78], eax
add esp, 0x50
ret
mov ebx, dword [esp + 0x54]
mov ebp, dword [esp + 0x60]
jmp 0x5211db
mov ebx, dword [esp + 0x54]
mov ebp, dword [esp + 0x60]
mov ecx, dword [esp + 0x5c]
test ecx, ecx
je 0x5211ff
mov esi, dword [esp + 0x68]
test esi, esi
je 0x5211ff
lea edi, [ebx + ecx*4 - 4]
lea ebp, [ebp + esi*4 - 4]
cmp ebp, edi
je 0x5212ca
mov ebp, dword [esp + 0x60]
cmp edx, ecx
jg 0x521207
mov eax, edx
jmp 0x521275
cmp edx, 1
jne 0x521244
lea eax, [0x63e860]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00447490
mov eax, dword [esp + 0xc]
mov ebp, dword [esp + 0x60]
mov edx, 1
mov ebx, eax
mov ecx, 1
mov eax, dword [esp + 0x64]
jmp 0x521275
lea eax, [0x63e860]
mov dword [esp], eax
mov dword [esp + 4], edx
lea eax, [edx + 4]
mov dword [esp + 0x28], eax
mov dword [esp + 8], eax
call fcn.00447490
mov eax, dword [esp + 0xc]
mov ebp, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
mov ebx, eax
mov ecx, dword [esp + 0x28]
mov eax, edx
cmp eax, edx
jl 0x52127b
mov eax, edx
cmp ebp, ebx
je 0x5212aa
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x4c], ebx
mov dword [esp], ebx
mov dword [esp + 4], ebp
shl eax, 2
mov dword [esp + 8], eax
call fcn.0045f7b0
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], ecx
add esp, 0x50
ret
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x64]
mov ebx, dword [esp + 0x54]
mov esi, dword [esp + 0x68]
test edx, edx
je 0x5213e7
shr eax, 5
mov dword [esp + 0x44], eax
lea edi, [eax + edx]
mov dword [esp + 0x38], edi
lea ebp, [eax + edx + 1]
cmp ecx, ebp
jge 0x521364
test edi, edi
jne 0x521328
lea eax, [0x63e860]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00447490
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x64]
mov esi, dword [esp + 0x68]
mov ebx, eax
mov ecx, 1
mov ebp, 1
mov eax, dword [esp + 0x44]
jmp 0x521364
mov dword [esp + 0x34], ebp
lea ecx, [0x63e860]
mov dword [esp], ecx
mov dword [esp + 4], ebp
lea ecx, [eax + edx + 5]
mov dword [esp + 0x24], ecx
mov dword [esp + 8], ecx
call fcn.00447490
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x64]
mov esi, dword [esp + 0x68]
mov ebx, eax
mov ecx, dword [esp + 0x24]
mov ebp, dword [esp + 0x34]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ecx
mov dword [esp + 0x48], ebx
sub ecx, eax
mov dword [esp + 0x40], ecx
shl eax, 2
mov dword [esp + 0x3c], eax
neg ecx
sar ecx, 0x1f
and ecx, eax
add ecx, ebx
mov dword [esp], ecx
mov dword [esp + 4], edx
mov ecx, dword [esp + 0x40]
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x60]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], esi
mov ecx, dword [esp + 0x6c]
and ecx, 0x1f
mov dword [esp + 0x18], ecx
call fcn.005280a0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x48]
mov dword [edx + ecx*4], eax
nop
mov eax, dword [esp + 0x44]
test eax, eax
je 0x5213e1
mov dword [esp], edx
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], eax
call fcn.0045f5e0
mov edx, dword [esp + 0x48]
mov ebp, dword [esp + 0x20]
jmp 0x5213fc
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], ecx
add esp, 0x50
ret
dec ebp
test ebp, ebp
jle 0x521408
mov eax, dword [edx + ebp*4 - 4]
test eax, eax
je 0x5213fb
mov dword [esp + 0x70], edx
mov dword [esp + 0x74], ebp
mov eax, dword [esp + 0x24]
mov dword [esp + 0x78], eax
add esp, 0x50
ret
call fcn.0045dbb0
jmp fcn.00521170