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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x522b88
sub esp, 0x64
mov eax, dword [esp + 0x68]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
mov ecx, dword [ecx + 4]
lea ebx, [edx - 1]
test ebx, ebx
jl 0x522b59
mov ecx, dword [ecx + edx*4 - 4]
cmp ecx, 0x10000
jb 0x522b52
shr ecx, 0x10
mov edx, 0x10
cmp ecx, 0x100
jb 0x5228f6
shr ecx, 8
add edx, 8
cmp ecx, 0x100
jae 0x522b81
shl ebx, 5
lea ebp, [0xa3e500]
movzx ecx, byte [ecx + ebp]
add ecx, edx
add ecx, ebx
lea edx, [ecx + 7]
sar edx, 0x1f
shr edx, 0x1d
lea edx, [edx + ecx + 7]
sar edx, 3
mov ebx, dword [esp + 0x80]
cmp ebx, edx
jne 0x522b34
mov dword [esp + 0x30], ecx
mov byte [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
lea eax, [esp + 0x54]
mov dword [esp], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 4], eax
mov dword [esp + 8], ebx
mov eax, dword [esp + 0x84]
mov dword [esp + 0xc], eax
call fcn.004edb60
mov eax, dword [esp + 0x10]
mov byte [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
lea ecx, [esp + 0x44]
mov dword [esp], ecx
mov ecx, dword [esp + 0x68]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.00523780
mov eax, dword [esp + 0xc]
mov dword [esp + 0x3c], eax
mov dword [esp], eax
call fcn.004edbf0
mov eax, dword [esp + 0x30]
lea ecx, [eax + 6]
sar ecx, 0x1f
shr ecx, 0x1d
lea ecx, [ecx + eax + 6]
sar ecx, 3
mov edx, dword [esp + 8]
cmp ecx, edx
jl 0x522b16
lea eax, [0x731080]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], ecx
call fcn.00438a70
mov eax, dword [esp + 0x14]
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x34], ecx
mov edx, dword [esp + 0xc]
mov dword [esp + 0x40], edx
mov ebx, dword [esp + 0x3c]
mov dword [esp], ebx
call fcn.004edbf0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
mov ebx, dword [esp + 0x40]
mov dword [esp], ebx
mov ebp, dword [esp + 0x34]
mov dword [esp + 4], ebp
mov esi, dword [esp + 0x38]
mov dword [esp + 8], esi
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
call fcn.005219f0
mov eax, dword [esp + 0x88]
cmp eax, 0xffffffff
jne 0x522b06
mov eax, dword [esp + 0x6c]
lea ecx, [eax - 1]
cmp ecx, 0x13
jae 0x522b67
mov ecx, dword [0xa75928]
mov edx, dword [0xa7592c]
cmp eax, edx
jae 0x522b60
movzx ecx, byte [ecx + eax]
mov dword [esp + 0x88], ecx
mov dword [esp], eax
call fcn.004e00b0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x70]
mov dword [esp], edx
mov edx, dword [esp + 0x74]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x78]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x40]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x30]
dec edx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x88]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
call fcn.00521e60
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], ecx
add esp, 0x64
ret
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x88]
jmp 0x522a85
mov eax, dword [0xa7cea4]
mov ecx, dword [0xa7cea0]
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], eax
add esp, 0x64
ret
mov eax, dword [0xa7cea0]
mov ecx, dword [0xa7cea4]
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], ecx
add esp, 0x64
ret
xor edx, edx
jmp 0x5228e8
xor ecx, ecx
jmp 0x522913
call fcn.004266e0
ud2
lea eax, [0x730dc0]
mov dword [esp], eax
lea eax, [0x7fc598]
mov dword [esp + 4], eax
call fcn.004275c0
ud2
call fcn.004266e0
ud2
call fcn.0044b280
jmp fcn.005228a0