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

Disassembly:
mov ecx, dword [0x7da588]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
lea eax, [esp - 0x38]
cmp eax, dword [ecx + 8]
jbe 0x5230f3
sub esp, 0xb8
mov eax, dword [esp + 0xd8]
mov ecx, dword [esp + 0xc8]
mov edx, dword [esp + 0xc4]
mov ebx, dword [esp + 0xc0]
mov ebp, dword [esp + 0xbc]
mov esi, dword [esp + 0xd4]
mov edi, dword [esp + 0xd0]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0xcc]
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], ecx
mov ecx, 1
mov byte [esp + 0x2f], cl
mov ecx, 1
mov byte [esp + 0x2e], cl
mov ecx, dword [esp + 0x58]
jmp 0x522b7d
mov ebp, dword [esp + 0xd8]
mov esi, dword [esp + 0xc8]
mov edi, dword [esp + 0xc4]
mov ebp, dword [esp + 0xbc]
mov dword [esp + 0x54], eax
mov edi, edx
mov esi, dword [esp + 0x6c]
mov byte [esp + 0x2f], cl
mov byte [esp + 0x2e], bl
mov ecx, dword [esp + 0xc8]
mov edx, dword [esp + 0xc4]
mov ebx, dword [esp + 0xc0]
mov dword [esp + 0x50], edi
mov eax, dword [esp + 0x54]
sub edi, eax
cmp edi, 0xc
jle 0x522f8c
test esi, esi
je 0x522f57
mov dword [esp + 0x3c], edi
movzx edi, byte [esp + 0x2f]
xchg edi, eax
test al, al
xchg edi, eax
jne 0x522c00
mov dword [esp + 0x70], esi
mov esi, dword [ebp + 8]
mov dword [esp], esi
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
mov esi, dword [esp + 0x50]
mov dword [esp + 0x14], esi
mov edi, dword [esp + 0xd8]
mov dword [esp + 0x18], edi
call fcn.005244e0
mov eax, dword [esp + 0x70]
lea esi, [eax - 1]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0xc8]
mov edx, dword [esp + 0xc4]
mov ebx, dword [esp + 0xc0]
mov ebp, dword [esp + 0xbc]
mov dword [esp + 0x6c], esi
mov edi, dword [ebp + 0xc]
mov dword [esp], edi
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x50]
mov dword [esp + 0x14], edi
mov esi, dword [esp + 0xd8]
mov dword [esp + 0x18], esi
call fcn.00524070
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
cmp eax, 2
jne 0x522c64
mov dword [esp + 0x34], ecx
nop
mov ebx, dword [esp + 0x50]
lea ebp, [ebx - 1]
mov eax, dword [esp + 0xc4]
mov edx, dword [esp + 0xc0]
mov esi, dword [esp + 0x54]
mov edi, esi
jmp 0x522ffe
movzx ebx, byte [esp + 0x2f]
test bl, bl
mov dword [esp + 0x68], ecx
je 0x522cec
movzx ebp, byte [esp + 0x2e]
xchg ebp, eax
test al, al
xchg ebp, eax
je 0x522cf1
cmp eax, 1
jne 0x522cf1
mov eax, dword [esp + 0xbc]
mov ecx, dword [eax + 0x14]
mov dword [esp], ecx
mov ecx, dword [esp + 0xc0]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0xc4]
mov dword [esp + 8], edx
mov ebx, dword [esp + 0xc8]
mov dword [esp + 0xc], ebx
mov ebp, dword [esp + 0x54]
mov dword [esp + 0x10], ebp
mov esi, dword [esp + 0x50]
mov dword [esp + 0x14], esi
mov edi, dword [esp + 0xd8]
mov dword [esp + 0x18], edi
call fcn.00523b20
movzx eax, byte [esp + 0x1c]
test al, al
jne 0x522fc1
mov ecx, dword [esp + 0x68]
movzx ebx, byte [esp + 0x2f]
movzx ebp, byte [esp + 0x2e]
jmp 0x522cf1
movzx ebp, byte [esp + 0x2e]
mov eax, ebx
mov ebx, dword [esp + 0x54]
test ebx, ebx
jle 0x522d8e
lea edx, [ebx - 1]
mov ebp, dword [esp + 0xc4]
cmp ebp, edx
jbe 0x522fd1
lea edx, [ebx + ebx*4]
mov ebx, dword [esp + 0xc0]
lea edx, [ebx + edx*4 - 0x14]
lea edi, [esp + 0x90]
mov esi, edx
call fcn.0046c56e
mov ecx, dword [esp + 0x68]
cmp ebp, ecx
jbe 0x522fc8
lea eax, [ecx + ecx*4]
lea esi, [ebx + eax*4]
lea edi, [esp + 0x7c]
call fcn.0046c56e
mov edx, dword [esp + 0xd8]
mov eax, dword [edx]
lea edi, [esp]
lea esi, [esp + 0x90]
call fcn.0046c56e
lea edi, [esp + 0x14]
lea esi, [esp + 0x7c]
call fcn.0046c56e
call eax
mov eax, dword [esp + 0x28]
test eax, eax
setge al
mov ecx, dword [esp + 0x68]
mov ebx, dword [esp + 0x54]
movzx ebp, byte [esp + 0x2e]
mov edx, eax
movzx eax, byte [esp + 0x2f]
jmp 0x522d90
xor edx, edx
test dl, dl
je 0x522df9
mov eax, dword [esp + 0xbc]
mov edx, dword [eax + 0x18]
mov dword [esp], edx
mov edx, dword [esp + 0xc0]
mov dword [esp + 4], edx
mov ebp, dword [esp + 0xc4]
mov dword [esp + 8], ebp
mov esi, dword [esp + 0xc8]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x50]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0xd8]
mov dword [esp + 0x1c], ecx
call fcn.005237d0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x50]
movzx ecx, byte [esp + 0x2f]
movzx ebx, byte [esp + 0x2e]
jmp 0x522b3a
mov eax, dword [esp + 0xbc]
mov edx, dword [eax + 0x1c]
mov dword [esp], edx
mov edx, dword [esp + 0xc0]
mov dword [esp + 4], edx
mov ebp, dword [esp + 0xc4]
mov dword [esp + 8], ebp
mov esi, dword [esp + 0xc8]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
mov edi, dword [esp + 0x50]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0xd8]
mov dword [esp + 0x1c], ecx
call fcn.00523100
mov eax, dword [esp + 0x20]
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x54]
mov edx, eax
sub eax, ecx
mov ebx, dword [esp + 0x50]
mov ebp, ebx
sub ebx, edx
movzx esi, byte [esp + 0x24]
xchg esi, eax
mov byte [esp + 0x2e], al
xchg esi, eax
mov edi, dword [esp + 0x3c]
sar edi, 3
mov dword [esp + 0x4c], edi
cmp ebx, eax
jle 0x522ee3
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0xbc]
mov ebx, dword [eax + 0x20]
mov dword [esp], ebx
mov ebx, dword [esp + 0xc0]
mov dword [esp + 4], ebx
mov ebp, dword [esp + 0xc4]
mov dword [esp + 8], ebp
mov esi, dword [esp + 0xc8]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x18], ecx
mov edi, dword [esp + 0xd8]
mov dword [esp + 0x1c], edi
call fcn.00522ac0
mov eax, dword [esp + 0x38]
inc eax
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x40]
cmp ecx, edx
setle cl
mov edx, dword [esp + 0x50]
jmp 0x522f4d
mov dword [esp + 0x30], ebx
mov eax, dword [esp + 0xbc]
mov ecx, dword [eax + 0x20]
mov dword [esp], ecx
mov ecx, dword [esp + 0xc0]
mov dword [esp + 4], ecx
mov ebx, dword [esp + 0xc4]
mov dword [esp + 8], ebx
mov esi, dword [esp + 0xc8]
mov dword [esp + 0xc], esi
lea edi, [edx + 1]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x6c]
mov dword [esp + 0x18], ebp
mov edi, dword [esp + 0xd8]
mov dword [esp + 0x1c], edi
call fcn.00522ac0
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x30]
cmp eax, ecx
setle cl
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x38]
movzx ebx, byte [esp + 0x2e]
jmp 0x522b3a
mov ebp, dword [ebp + 4]
mov dword [esp], ebp
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xd8]
mov dword [esp + 0x18], eax
call fcn.00524740
add esp, 0xb8
ret
mov ebp, dword [ebp]
mov dword [esp], ebp
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xd8]
mov dword [esp + 0x18], eax
call fcn.00524bd0
add esp, 0xb8
ret
add esp, 0xb8
ret
mov eax, ecx
mov ecx, ebp
call fcn.0046bef0
mov eax, edx
mov ecx, ebp
call fcn.0046bef0
mov edi, dword [esp + 0x78]
lea esi, [esp + 0xa4]
call fcn.0046c56e
mov ecx, dword [esp + 0x48]
lea esi, [ecx + 1]
dec ebp
mov ecx, dword [esp + 0x34]
mov ebx, dword [esp + 0x50]
mov edi, dword [esp + 0x54]
cmp ebp, esi
jle 0x5230c8
cmp eax, esi
jbe 0x5230e9
mov dword [esp + 0x48], esi
lea ebx, [esi + esi*4]
lea ebx, [edx + ebx*4]
lea edi, [esp + 0xa4]
mov esi, ebx
call fcn.0046c56e
cmp eax, ebp
jbe 0x5230e0
mov dword [esp + 0x44], ebp
mov ecx, dword [0x7da640]
lea esi, [ebp + ebp*4]
lea esi, [edx + esi*4]
mov dword [esp + 0x78], esi
test ecx, ecx
je 0x52307b
mov dword [esp + 0x74], ebx
lea eax, [0x5eb340]
mov dword [esp], eax
mov dword [esp + 4], ebx
mov dword [esp + 8], esi
call fcn.00412350
mov eax, dword [esp + 0xc4]
mov edx, dword [esp + 0xc0]
mov ebx, dword [esp + 0x74]
mov ebp, dword [esp + 0x44]
mov esi, dword [esp + 0x78]
mov edi, ebx
call fcn.0046c56e
mov ecx, dword [0x7da640]
test ecx, ecx
je 0x522fda
lea eax, [0x5eb340]
mov dword [esp], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 4], eax
lea ecx, [esp + 0xa4]
mov dword [esp + 8], ecx
call fcn.00412350
mov eax, dword [esp + 0xc4]
mov edx, dword [esp + 0xc0]
mov ebp, dword [esp + 0x44]
jmp 0x522fda
sub ecx, edi
sub ebx, ecx
lea ecx, [ebx - 1]
movzx ebx, byte [esp + 0x2f]
test bl, bl
mov eax, 1
jmp 0x522c6b
mov ecx, eax
mov eax, ebp
call fcn.0046bef0
mov ecx, eax
mov eax, esi
call fcn.0046bef0
nop
call fcn.0046aa70
jmp fcn.00522ac0