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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0xb8]
cmp eax, dword [ecx + 8]
jbe 0x523964
sub esp, 0x138
mov byte [esp + 0xe8], 0
mov dword [esp + 0xec], 0
mov dword [esp + 0xf0], 0
mov dword [esp + 0xf4], 0
nop
mov eax, dword [esp + 0x148]
lea ecx, [esp + 0xe8]
cmp eax, ecx
je 0x522e86
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
test ecx, ecx
jg 0x522d98
xor ebx, ebx
xor ebp, ebp
xor esi, esi
jmp 0x522e25
mov dword [esp + 0x5c], ecx
mov dword [esp + 0xa0], edx
cmp ecx, 1
jne 0x522dea
lea eax, [0x67e160]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00447740
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0xa0]
mov ebx, 1
mov ebp, eax
mov esi, 1
mov eax, dword [esp + 0x148]
jmp 0x522e25
lea eax, [0x67e160]
mov dword [esp], eax
mov dword [esp + 4], ecx
lea edx, [ecx + 4]
mov dword [esp + 0x40], edx
mov dword [esp + 8], edx
call fcn.00447740
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0xa0]
mov ebx, ecx
mov ebp, eax
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x148]
cmp ebx, ecx
jg 0x522e2b
mov ecx, ebx
cmp ebp, edx
je 0x522e67
mov dword [esp + 0x50], esi
mov dword [esp + 0x48], ebx
mov dword [esp + 0x94], ebp
mov dword [esp], ebp
mov dword [esp + 4], edx
shl ecx, 2
mov dword [esp + 8], ecx
call fcn.0045fe60
mov eax, dword [esp + 0x148]
mov ebx, dword [esp + 0x48]
mov ebp, dword [esp + 0x94]
mov esi, dword [esp + 0x50]
mov dword [esp + 0xf0], ebx
mov dword [esp + 0xf4], esi
mov dword [esp + 0xec], ebp
movzx ecx, byte [eax]
mov byte [esp + 0xe8], cl
mov byte [esp + 0xe8], 0
mov byte [esp + 0xd8], 0
mov dword [esp + 0xdc], 0
mov dword [esp + 0xe0], 0
mov dword [esp + 0xe4], 0
nop
mov ecx, dword [esp + 0x14c]
lea edx, [esp + 0xd8]
cmp ecx, edx
je 0x522fe6
mov edx, dword [ecx + 8]
mov ebx, dword [ecx + 4]
test edx, edx
jg 0x522ee3
xor ebp, ebp
xor esi, esi
xor edi, edi
jmp 0x522f7e
mov dword [esp + 0x58], edx
mov dword [esp + 0x9c], ebx
cmp edx, 1
jne 0x522f3c
lea eax, [0x67e160]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00447740
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x14c]
mov edx, dword [esp + 0x58]
mov ebx, dword [esp + 0x9c]
mov ebp, 1
mov esi, eax
mov edi, 1
mov eax, dword [esp + 0x148]
jmp 0x522f7e
lea eax, [0x67e160]
mov dword [esp], eax
mov dword [esp + 4], edx
lea ecx, [edx + 4]
mov dword [esp + 0x3c], ecx
mov dword [esp + 8], ecx
call fcn.00447740
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x14c]
mov edx, dword [esp + 0x58]
mov ebx, dword [esp + 0x9c]
mov ebp, edx
mov esi, eax
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x148]
cmp ebp, edx
jg 0x522f84
mov edx, ebp
cmp esi, ebx
je 0x522fc7
mov dword [esp + 0x44], ebp
mov dword [esp + 0x90], esi
mov dword [esp + 0x4c], edi
mov dword [esp], esi
mov dword [esp + 4], ebx
shl edx, 2
mov dword [esp + 8], edx
call fcn.0045fe60
mov eax, dword [esp + 0x148]
mov ecx, dword [esp + 0x14c]
mov ebp, dword [esp + 0x44]
mov esi, dword [esp + 0x90]
mov edi, dword [esp + 0x4c]
mov dword [esp + 0xe0], ebp
mov dword [esp + 0xe4], edi
mov dword [esp + 0xdc], esi
movzx edx, byte [ecx]
mov byte [esp + 0xd8], dl
mov byte [esp + 0xd8], 0
mov edx, dword [esp + 0x140]
test edx, edx
je 0x523007
mov ebx, dword [esp + 0x144]
mov ebp, 1
jmp 0x523017
mov ebx, dword [esp + 0x144]
test ebx, ebx
xchg ebp, ebx
setne bl
xchg ebp, ebx
xchg ebp, eax
mov byte [esp + 0x2d], al
xchg ebp, eax
xchg ebp, eax
test al, al
xchg ebp, eax
jne 0x523029
xor esi, esi
xor edi, edi
jmp 0x5230a7
mov byte [esp + 0xc8], 0
mov dword [esp + 0xcc], 0
mov dword [esp + 0xd0], 0
mov dword [esp + 0xd4], 0
lea eax, [esp + 0xc8]
mov dword [esp], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 1
call fcn.005211b0
mov eax, dword [esp + 0xc]
mov byte [esp + 0xb8], 0
mov dword [esp + 0xbc], 0
mov dword [esp + 0xc0], 0
mov dword [esp + 0xc4], 0
lea esi, [esp + 0xb8]
mov edi, eax
mov dword [esp + 0xa8], edi
mov dword [esp + 0xb4], esi
mov byte [esp + 0x128], 0
mov dword [esp + 0x12c], 0
mov dword [esp + 0x130], 0
mov dword [esp + 0x134], 0
mov byte [esp + 0x118], 0
mov dword [esp + 0x11c], 0
mov dword [esp + 0x120], 0
mov dword [esp + 0x124], 0
mov byte [esp + 0x108], 0
mov dword [esp + 0x10c], 0
mov dword [esp + 0x110], 0
mov dword [esp + 0x114], 0
mov byte [esp + 0xf8], 0
mov dword [esp + 0xfc], 0
mov dword [esp + 0x100], 0
mov dword [esp + 0x104], 0
mov eax, dword [esp + 0xec]
mov ecx, dword [esp + 0xf0]
mov edx, dword [esp + 0xf4]
mov ebx, dword [esp + 0xdc]
mov ebp, dword [esp + 0xe0]
mov esi, dword [esp + 0xe4]
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], esi
call fcn.005250d0
mov eax, dword [esp + 0x18]
test eax, eax
jge 0x5231c5
lea eax, [esp + 0xe8]
mov ecx, dword [esp + 0xa8]
mov edx, dword [esp + 0xb4]
lea ebx, [esp + 0xd8]
jmp 0x5231e1
lea eax, [esp + 0xd8]
mov ecx, dword [esp + 0xb4]
mov edx, dword [esp + 0xa8]
lea ebx, [esp + 0xe8]
mov dword [esp + 0xa8], edx
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xa4], ecx
mov dword [esp + 0xac], eax
jmp 0x52321b
mov eax, dword [esp + 0xac]
mov ecx, dword [esp + 0xa4]
mov edx, dword [esp + 0xa8]
mov ebx, dword [esp + 0xb0]
mov ebp, dword [eax + 8]
cmp ebp, 1
jle 0x5233bb
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00522500
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x14]
movzx ebp, byte [esp + 0x18]
test eax, eax
je 0x52334a
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x78], edx
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], ebx
xchg ebp, eax
mov byte [esp + 0x2f], al
xchg ebp, eax
mov esi, dword [esp + 0xb0]
mov dword [esp], esi
mov edi, dword [esp + 0xac]
mov dword [esp + 4], edi
lea esi, [esp + 0x128]
mov dword [esp + 8], esi
lea esi, [esp + 0x118]
mov dword [esp + 0xc], esi
lea esi, [esp + 0x108]
mov dword [esp + 0x10], esi
lea esi, [esp + 0xf8]
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebx
xchg ebp, eax
mov byte [esp + 0x28], al
xchg ebp, eax
call fcn.005226b0
movzx eax, byte [esp + 0x2d]
test al, al
je 0x5231ff
mov eax, dword [esp + 0xa8]
mov dword [esp], eax
mov ecx, dword [esp + 0xa4]
mov dword [esp + 4], ecx
lea edx, [esp + 0x128]
mov dword [esp + 8], edx
lea ebx, [esp + 0x118]
mov dword [esp + 0xc], ebx
lea ebp, [esp + 0x108]
mov dword [esp + 0x10], ebp
lea esi, [esp + 0xf8]
mov dword [esp + 0x14], esi
mov edi, dword [esp + 0x7c]
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x78]
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x70]
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x6c]
mov dword [esp + 0x24], edi
movzx edi, byte [esp + 0x2f]
xchg edi, eax
mov byte [esp + 0x28], al
xchg edi, eax
call fcn.005226b0
movzx eax, byte [esp + 0x2d]
jmp 0x5231ff
mov eax, dword [esp + 0xb0]
mov dword [esp], eax
mov ecx, dword [esp + 0xac]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0xa8]
mov dword [esp + 8], edx
mov ebx, dword [esp + 0xa4]
mov dword [esp + 0xc], ebx
lea ebp, [esp + 0x128]
mov dword [esp + 0x10], ebp
lea esi, [esp + 0x118]
mov dword [esp + 0x14], esi
lea edi, [esp + 0x108]
mov dword [esp + 0x18], edi
lea edi, [esp + 0xf8]
mov dword [esp + 0x1c], edi
movzx edi, byte [esp + 0x2d]
xchg edi, eax
mov byte [esp + 0x20], al
xchg edi, eax
call fcn.00522960
movzx eax, byte [esp + 0x2d]
jmp 0x5231ff
test ebp, ebp
je 0x52347e
cmp dword [ebx + 8], 1
jle 0x523430
mov dword [esp], ebx
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
lea ebp, [esp + 0x128]
mov dword [esp + 0x10], ebp
lea ebp, [esp + 0x118]
mov dword [esp + 0x14], ebp
lea ebp, [esp + 0x108]
mov dword [esp + 0x18], ebp
lea esi, [esp + 0xf8]
mov dword [esp + 0x1c], esi
movzx edi, byte [esp + 0x2d]
xchg edi, eax
mov byte [esp + 0x20], al
xchg edi, eax
call fcn.00522960
mov eax, dword [esp + 0xac]
mov ecx, dword [esp + 0xa4]
mov edx, dword [esp + 0xa8]
mov ebx, dword [esp + 0xb0]
mov ebp, dword [eax + 8]
mov esi, dword [eax + 4]
test ebp, ebp
je 0x52347e
mov ebp, dword [ebx + 4]
mov ebp, dword [ebp]
mov esi, dword [esi]
mov edi, ecx
movzx ecx, byte [esp + 0x2d]
test cl, cl
je 0x52373f
mov ecx, 1
xor ecx, ecx
mov dword [esp + 0x74], ecx
mov ecx, 1
mov dword [esp + 0x68], ecx
xor ecx, ecx
mov dword [esp + 0x60], ecx
mov ecx, 1
mov byte [esp + 0x2e], cl
mov ecx, 1
jmp 0x5237c0
mov ecx, dword [esp + 0x148]
movzx ebp, byte [ecx]
mov esi, dword [esp + 0x144]
test esi, esi
je 0x523697
xchg ebp, eax
mov byte [esp + 0x2c], al
xchg ebp, eax
mov edi, ebx
mov ebx, dword [esp + 0x14c]
cmp ebx, esi
jne 0x523608
nop
cmp ebx, eax
je 0x52360a
mov ebp, dword [eax + 0xc]
mov edx, dword [eax + 4]
mov ecx, dword [ebx + 8]
mov dword [esp + 0x54], ecx
mov esi, dword [ebx + 4]
cmp ebp, ecx
jge 0x52356a
mov dword [esp + 0x98], esi
cmp ecx, 1
jne 0x523525
lea eax, [0x67e160]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00447740
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0xac]
mov ebx, dword [esp + 0x14c]
mov esi, dword [esp + 0x98]
mov edi, dword [esp + 0xb0]
mov ecx, 1
mov ebp, 1
jmp 0x52356a
lea eax, [0x67e160]
mov dword [esp], eax
mov dword [esp + 4], ecx
lea eax, [ecx + 4]
mov dword [esp + 0x38], eax
mov dword [esp + 8], eax
call fcn.00447740
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0xac]
mov ebx, dword [esp + 0x14c]
mov esi, dword [esp + 0x98]
mov edi, dword [esp + 0xb0]
mov ecx, dword [esp + 0x54]
mov ebp, dword [esp + 0x38]
mov ebx, dword [esp + 0x54]
cmp ecx, ebx
jg 0x523574
mov ebx, ecx
cmp edx, esi
je 0x5235b7
mov dword [esp + 0x34], ebp
mov dword [esp + 0x30], ecx
mov dword [esp + 0x8c], edx
mov dword [esp], edx
mov dword [esp + 4], esi
shl ebx, 2
mov dword [esp + 8], ebx
call fcn.0045fe60
mov eax, dword [esp + 0xac]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x8c]
mov ebp, dword [esp + 0x34]
mov edi, dword [esp + 0xb0]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ebp
mov ecx, dword [0xa43e50]
test ecx, ecx
jne 0x5235cc
mov dword [eax + 4], edx
jmp 0x5235e0
lea ecx, [eax + 4]
mov ebx, edi
mov edi, ecx
mov ebp, eax
mov eax, edx
call fcn.0045f670
mov eax, ebp
mov edi, ebx
mov ecx, dword [esp + 0x14c]
movzx ecx, byte [ecx]
mov byte [eax], cl
mov ecx, dword [esp + 0x148]
mov edx, dword [esp + 0xa8]
movzx ebp, byte [esp + 0x2c]
mov esi, dword [esp + 0x144]
jmp 0x52360a
mov eax, ebx
mov dword [esp + 0xac], eax
mov dword [esp], esi
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.005216e0
movzx eax, byte [esp + 0x2c]
test al, al
je 0x52363b
mov ecx, dword [esp + 0x144]
movzx edx, byte [ecx]
xor edx, 1
mov byte [ecx], dl
jmp 0x523642
mov ecx, dword [esp + 0x144]
mov dword [esp], ecx
mov eax, dword [esp + 0xb0]
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
call fcn.005214a0
mov eax, dword [esp + 0x144]
mov dword [esp], eax
mov dword [esp + 4], eax
mov eax, dword [esp + 0xac]
mov dword [esp + 8], eax
call fcn.005219a0
mov eax, dword [esp + 0x140]
test eax, eax
mov ecx, eax
mov edx, dword [esp + 0xa8]
mov ebx, dword [esp + 0xb0]
movzx ebp, byte [esp + 0x2c]
jmp 0x5236a0
mov ecx, dword [esp + 0x140]
test ecx, ecx
je 0x5236e7
mov eax, dword [edx + 4]
movzx esi, byte [edx]
mov edi, ebx
mov ebx, dword [edx + 8]
mov edx, dword [edx + 0xc]
xchg esi, eax
mov byte [ecx], al
xchg esi, eax
mov dword [ecx + 8], ebx
mov dword [ecx + 0xc], edx
mov edx, dword [0xa43e50]
test edx, edx
jne 0x5236c9
mov dword [ecx + 4], eax
jmp 0x5236d7
lea edx, [ecx + 4]
mov ebx, edi
mov edi, edx
call fcn.0045f670
mov edi, ebx
xchg ebp, eax
test al, al
xchg ebp, eax
je 0x5236e9
movzx edx, byte [ecx]
xor edx, 1
mov byte [ecx], dl
jmp 0x5236e9
mov edi, ebx
mov eax, dword [edi + 4]
movzx ecx, byte [edi]
mov edx, dword [edi + 0xc]
mov ebx, dword [edi + 8]
mov ebp, dword [esp + 0x13c]
mov byte [ebp], cl
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], edx
mov ecx, dword [0xa43e50]
test ecx, ecx
jne 0x523714
mov dword [ebp + 4], eax
jmp 0x52371c
lea edi, [ebp + 4]
call fcn.0045f670
mov dword [esp + 0x150], ebp
add esp, 0x138
ret
mov ecx, eax
mov eax, ebp
xor edx, edx
div esi
mov eax, ecx
mov ebp, esi
mov esi, edx
mov edx, dword [esp + 0xa8]
test esi, esi
jne 0x52372a
mov ecx, dword [ebx + 4]
mov dword [ecx], ebp
jmp 0x52347e
mov eax, ebp
xor edx, edx
div esi
mov edx, eax
mov eax, ebp
mov ebp, edx
xor edx, edx
div esi
mov eax, edx
mov edx, dword [esp + 0x74]
imul edx, ebp
add edx, ecx
mov ecx, edx
mov edx, dword [esp + 0x68]
imul ebp, edx
mov edx, dword [esp + 0x60]
add edx, ebp
mov ebp, edx
movzx edx, byte [esp + 0x2e]
xor edx, 1
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x60], eax
mov byte [esp + 0x2e], dl
mov eax, dword [esp + 0xac]
mov edx, dword [esp + 0xa8]
mov dword [esp + 0x68], ebp
mov ebp, esi
mov esi, dword [esp + 0x84]
mov esi, ecx
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x74], esi
mov esi, dword [esp + 0x84]
test esi, esi
jne 0x52374d
mov dword [esp + 0x80], ebp
mov esi, dword [esp + 0x104]
mov eax, dword [esp + 0xfc]
test ecx, ecx
jne 0x5237e1
xor ecx, ecx
jmp 0x523839
nop
cmp esi, 1
jge 0x523832
mov dword [esp + 0x64], ecx
lea eax, [0x67e160]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00447740
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0xa8]
mov ebx, dword [esp + 0xb0]
mov ebp, dword [esp + 0x80]
mov edi, dword [esp + 0xa4]
mov esi, 1
mov dword [eax], ecx
mov ecx, 1
mov dword [esp + 0x100], ecx
mov dword [esp + 0x104], esi
mov dword [esp + 0xfc], eax
mov eax, dword [esp + 0x114]
mov ecx, dword [esp + 0x10c]
mov esi, dword [esp + 0x60]
test esi, esi
jne 0x523868
xor esi, esi
jmp 0x5238bc
nop
cmp eax, 1
jge 0x5238b5
lea eax, [0x67e160]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], 1
call fcn.00447740
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0xa8]
mov ebx, dword [esp + 0xb0]
mov ebp, dword [esp + 0x80]
mov esi, dword [esp + 0x60]
mov edi, dword [esp + 0xa4]
mov eax, 1
mov dword [ecx], esi
mov esi, 1
mov dword [esp + 0x110], esi
mov dword [esp + 0x114], eax
mov dword [esp + 0x10c], ecx
movzx eax, byte [esp + 0x2e]
mov ecx, eax
xor eax, 1
mov byte [esp + 0xf8], al
mov byte [esp + 0x108], cl
lea eax, [esp + 0xf8]
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], eax
call fcn.005216e0
lea eax, [esp + 0x108]
mov dword [esp], eax
mov ecx, dword [esp + 0xa4]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.005216e0
mov eax, dword [esp + 0xa8]
mov dword [esp], eax
lea ecx, [esp + 0xf8]
mov dword [esp + 4], ecx
lea ecx, [esp + 0x108]
mov dword [esp + 8], ecx
call fcn.00521260
mov eax, dword [esp + 0xac]
mov edx, dword [esp + 0xa8]
mov ebx, dword [esp + 0xb0]
mov ebp, dword [esp + 0x80]
jmp 0x523743
call fcn.0045e260
jmp fcn.00522d20