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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0x248]
cmp eax, dword [ecx + 8]
jbe 0x522f95
sub esp, 0x2c8
mov eax, 0
mov dword [esp + 0x2c4], eax
mov byte [esp + 0x2b], 0
mov dword [esp + 0x2e0], 0
mov dword [esp + 0x2e4], 0
mov dword [esp + 0x2e8], 0
mov dword [esp + 0x2ec], 0
mov eax, dword [esp + 0x2d8]
test eax, eax
jne 0x522941
lea eax, [0x6b0f20]
mov dword [esp], eax
call fcn.0040bd30
mov edi, dword [esp + 4]
mov eax, dword [esp + 0x2d0]
mov dword [edi + 4], eax
mov eax, dword [0x8f52e0]
test eax, eax
jne 0x5228c0
mov ecx, dword [esp + 0x2cc]
mov dword [edi], ecx
jmp 0x5228cc
mov eax, dword [esp + 0x2cc]
call fcn.004642e0
mov dword [edi + 0xc], 0
mov ecx, dword [0x8f52e0]
test ecx, ecx
jne 0x5228e9
mov eax, dword [esp + 0x2d4]
mov dword [edi + 8], eax
jmp 0x5228fe
lea ecx, [edi + 8]
mov eax, dword [esp + 0x2d4]
mov edx, edi
mov edi, ecx
call fcn.004642e0
mov edi, edx
lea eax, [0x73c5c0]
mov dword [edi + 0x10], eax
lea eax, [0x739e9c]
mov dword [edi + 0x14], eax
mov dword [esp + 0x2e0], 0
mov dword [esp + 0x2e4], 0
lea eax, [0x73be90]
mov dword [esp + 0x2e8], eax
mov dword [esp + 0x2ec], edi
add esp, 0x2c8
ret
mov ecx, dword [esp + 0x2d4]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.005223c0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.004fcdc0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 8]
mov ebx, dword [esp + 0xc]
test ecx, ecx
je 0x522980
xor edx, edx
jmp 0x52298c
test ebx, ebx
jbe 0x522f7f
xor ecx, ecx
xor eax, eax
test ecx, ecx
je 0x522a74
mov dword [esp + 0x2a8], eax
mov dword [esp + 0x2c], ecx
lea eax, [0x6b0f20]
mov dword [esp], eax
call fcn.0040bd30
mov edi, dword [esp + 4]
mov eax, dword [esp + 0x2d0]
mov dword [edi + 4], eax
mov eax, dword [0x8f52e0]
test eax, eax
jne 0x5229d0
mov ecx, dword [esp + 0x2cc]
mov dword [edi], ecx
jmp 0x5229dc
mov eax, dword [esp + 0x2cc]
call fcn.004642e0
mov ecx, dword [esp + 0x2d8]
mov dword [edi + 0xc], ecx
mov ecx, dword [0x8f52e0]
test ecx, ecx
jne 0x5229fc
mov ecx, dword [esp + 0x2d4]
mov dword [edi + 8], ecx
jmp 0x522a11
lea ecx, [edi + 8]
mov eax, dword [esp + 0x2d4]
mov edx, edi
mov edi, ecx
call fcn.004642e0
mov edi, edx
mov ecx, dword [esp + 0x2c]
mov dword [edi + 0x10], ecx
mov ecx, dword [0x8f52e0]
test ecx, ecx
jne 0x522a2e
mov eax, dword [esp + 0x2a8]
mov dword [edi + 0x14], eax
jmp 0x522a43
lea ecx, [edi + 0x14]
mov eax, dword [esp + 0x2a8]
mov edx, edi
mov edi, ecx
call fcn.004642e0
mov edi, edx
mov dword [esp + 0x2e0], 0
mov dword [esp + 0x2e4], 0
lea eax, [0x73be90]
mov dword [esp + 0x2e8], eax
mov dword [esp + 0x2ec], edi
add esp, 0x2c8
ret
mov dword [esp + 0x2b0], edx
lea edi, [esp + 0x38]
xor eax, eax
call fcn.00464577
mov dword [esp], edx
mov dword [esp + 4], 0
lea ecx, [esp + 0x38]
mov dword [esp + 8], ecx
call fcn.004ffd80
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
test ecx, ecx
jne 0x522abd
mov eax, dword [esp + 0x38]
test eax, 0x400
je 0x522e96
lea eax, [0x73c5c0]
cmp edx, eax
jne 0x522aea
mov dword [esp], edx
mov dword [esp + 4], ebx
lea eax, [0x739f3c]
mov dword [esp + 8], eax
call fcn.004038b0
movzx eax, byte [esp + 0xc]
test al, al
jne 0x522c99
mov eax, dword [esp + 0x2b0]
mov dword [esp], eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 3
mov eax, dword [esp + 0x2dc]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 0
call fcn.004ff570
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
test ecx, ecx
je 0x522c0a
mov dword [esp + 0x2c0], ebx
mov dword [esp + 0x2bc], edx
lea eax, [0x6b0f20]
mov dword [esp], eax
call fcn.0040bd30
mov eax, dword [esp + 4]
mov dword [eax + 4], 0xa
lea ecx, [0x6d3dcb]
mov dword [eax], ecx
mov ecx, dword [esp + 0x2d8]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x8f52e0]
test ecx, ecx
jne 0x522b93
mov ecx, dword [esp + 0x2d4]
mov dword [eax + 8], ecx
jmp 0x522ba6
lea edi, [eax + 8]
mov ecx, eax
mov eax, dword [esp + 0x2d4]
call fcn.004642e0
mov eax, ecx
mov ecx, dword [esp + 0x2c0]
mov dword [eax + 0x10], ecx
mov ecx, dword [0x8f52e0]
test ecx, ecx
jne 0x522bc6
mov ecx, dword [esp + 0x2bc]
mov dword [eax + 0x14], ecx
jmp 0x522bd9
lea edi, [eax + 0x14]
mov ecx, eax
mov eax, dword [esp + 0x2bc]
call fcn.004642e0
mov eax, ecx
mov dword [esp + 0x2e0], 0
mov dword [esp + 0x2e4], 0
lea ecx, [0x73be90]
mov dword [esp + 0x2e8], ecx
mov dword [esp + 0x2ec], eax
add esp, 0x2c8
ret
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
lea ecx, [0x522fa0]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x2c4], ecx
mov byte [esp + 0x2b], 1
mov ecx, dword [esp + 0x2d4]
mov dword [esp], ecx
mov ecx, dword [esp + 0x2d8]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.00522fe0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x2e0], eax
mov dword [esp + 0x2e4], edx
mov dword [esp + 0x2e8], ecx
mov dword [esp + 0x2ec], ebx
mov byte [esp + 0x2b], 0
mov edx, dword [esp + 0x2c4]
mov eax, dword [edx]
call eax
add esp, 0x2c8
ret
lea edi, [esp + 0x5c]
mov ecx, 0x93
xor eax, eax
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x2b0]
mov dword [esp], edx
lea edx, [esp + 0x5c]
mov dword [esp + 4], edx
call fcn.004fe660
mov edx, dword [esp + 8]
mov ebx, dword [esp + 0xc]
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0xc]
test ebx, ebx
je 0x522d9b
mov dword [esp + 0x2c0], esi
mov dword [esp + 0x2b8], ebp
lea eax, [0x6b0f20]
mov dword [esp], eax
call fcn.0040bd30
mov eax, dword [esp + 4]
mov dword [eax + 4], 0xd
lea ecx, [0x6d4f8d]
mov dword [eax], ecx
mov ecx, dword [esp + 0x2d8]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x8f52e0]
test ecx, ecx
jne 0x522d24
mov ecx, dword [esp + 0x2d4]
mov dword [eax + 8], ecx
jmp 0x522d37
lea edi, [eax + 8]
mov ecx, eax
mov eax, dword [esp + 0x2d4]
call fcn.004642e0
mov eax, ecx
mov ecx, dword [esp + 0x2c0]
mov dword [eax + 0x10], ecx
mov ecx, dword [0x8f52e0]
test ecx, ecx
jne 0x522d57
mov ecx, dword [esp + 0x2b8]
mov dword [eax + 0x14], ecx
jmp 0x522d6a
lea edi, [eax + 0x14]
mov ecx, eax
mov eax, dword [esp + 0x2b8]
call fcn.004642e0
mov eax, ecx
mov dword [esp + 0x2e0], 0
mov dword [esp + 0x2e4], 0
lea ecx, [0x73be90]
mov dword [esp + 0x2e8], ecx
mov dword [esp + 0x2ec], eax
add esp, 0x2c8
ret
mov dword [esp], edx
call fcn.004ff7a0
lea eax, [0x6c5760]
mov dword [esp], eax
call fcn.0040bd30
mov eax, dword [esp + 4]
mov dword [esp + 0x2ac], eax
mov ecx, dword [esp + 0x5c]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x60]
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], ecx
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x68]
mov dword [eax + 0x14], edx
mov dword [eax + 0x18], ecx
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x70]
mov dword [eax + 0x1c], edx
mov dword [eax + 0x20], ecx
mov ecx, dword [esp + 0x78]
mov dword [eax + 0x24], ecx
mov ecx, dword [esp + 0x7c]
mov dword [eax + 0x28], ecx
mov ecx, dword [esp + 0x80]
mov dword [eax + 0x2c], ecx
mov dword [esp], eax
mov ecx, dword [esp + 0x2d4]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x2d8]
mov dword [esp + 8], ecx
call fcn.005238d0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
test eax, eax
je 0x522e5e
mov dword [esp + 0x2e0], 0
mov dword [esp + 0x2e4], 0
mov dword [esp + 0x2e8], ecx
mov dword [esp + 0x2ec], edx
add esp, 0x2c8
ret
lea eax, [0x73d6e8]
mov dword [esp + 0x2e0], eax
mov eax, dword [esp + 0x2ac]
mov dword [esp + 0x2e4], eax
mov dword [esp + 0x2e8], 0
mov dword [esp + 0x2ec], 0
add esp, 0x2c8
ret
lea eax, [0x6c5760]
mov dword [esp], eax
call fcn.0040bd30
mov eax, dword [esp + 4]
mov dword [esp + 0x2b4], eax
mov ecx, dword [esp + 0x38]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], edx
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], edx
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], edx
mov ecx, dword [esp + 0x54]
mov dword [eax + 0x24], ecx
mov ecx, dword [esp + 0x58]
mov dword [eax + 0x28], ecx
mov dword [esp], eax
mov ecx, dword [esp + 0x2d4]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x2d8]
mov dword [esp + 8], ecx
call fcn.005238d0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
test eax, eax
je 0x522f47
mov dword [esp + 0x2e0], 0
mov dword [esp + 0x2e4], 0
mov dword [esp + 0x2e8], ecx
mov dword [esp + 0x2ec], edx
add esp, 0x2c8
ret
lea eax, [0x73d6e8]
mov dword [esp + 0x2e0], eax
mov eax, dword [esp + 0x2b4]
mov dword [esp + 0x2e4], eax
mov dword [esp + 0x2e8], 0
mov dword [esp + 0x2ec], 0
add esp, 0x2c8
ret
xor eax, eax
mov ecx, eax
call fcn.00464360
nop
call fcn.004358d0
add esp, 0x2c8
ret
call fcn.00462ed0
jmp fcn.00522820