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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xb
push 0
push 0
dec ecx
jne 0x522788
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x522e42
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x5913d4]
mov eax, dword [eax]
cmp dword [eax + 0x6c], 0
jne 0x522dfc
mov eax, dword [0x5911e0]
cmp dword [eax], 0
je 0x522dfc
push 0
push 0x7080
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x1b8]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x134]
call fcn.00492ac0
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0xc], 0
je 0x522806
mov eax, dword [ebp - 0x20]
mov edx, dword [eax + 0x24]
mov eax, dword [eax + 0x20]
mov ecx, dword [ebp - 0x20]
mov ecx, dword [ecx + 0xc]
cmp edx, dword [ecx + 0x14]
jne 0x522804
cmp eax, dword [ecx + 0x10]
je 0x522824
mov eax, dword [0x5911e0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x2c0]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x1b8]
mov eax, dword [ebp - 0x20]
call fcn.0050ffb0
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x522dfc
mov eax, dword [ebp - 0x30]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 4]
call fcn.00522590
call fcn.0044e8c0
and eax, 0x7f
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + eax*4 + 0x60]
push eax
call fcn.0044e8c0
and eax, 0x7f
mov edx, dword [ebp - 0x30]
mov edx, dword [edx + eax*4 + 0x3c]
mov eax, dword [0x591088]
mov eax, dword [eax]
pop ecx
call fcn.00480470
test al, al
je 0x52288b
mov eax, dword [0x5911e0]
cmp dword [eax], 0
je 0x52288b
mov eax, dword [0x5911e0]
mov eax, dword [eax]
call fcn.00545740
xor eax, eax
mov dword [ebp - 0xc], eax
jmp 0x522932
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x158]
mov edx, dword [ebp - 0xc]
call fcn.00493da0
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x40]
call fcn.00480580
push dword [ebp - 0x40]
push 0x522e5c
push 0x522e78
lea eax, [ebp - 0x3c]
mov edx, 3
call fcn.00406d8c
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 8]
call fcn.00406eac
jne 0x52292f
push 0
push 0
mov eax, dword [0x591088]
mov eax, dword [eax]
call fcn.0047b4c0
and eax, 0x7f
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + eax*4 + 0x18]
call fcn.00428950
push 0x522e94
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x18]
push eax
mov eax, dword [0x591088]
mov eax, dword [eax]
call fcn.0047b4c0
and eax, 0x7f
mov edx, dword [ebp - 0x30]
mov ecx, dword [edx + eax*4 + 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x158]
mov edx, dword [ebp - 0x2c]
call fcn.00493d40
jmp 0x522932
inc dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x158]
call fcn.00493dd0
cmp eax, dword [ebp - 0xc]
jg 0x522895
mov eax, dword [ebp - 4]
call fcn.00522710
test al, al
je 0x522dfc
mov eax, dword [ebp - 4]
cmp dword [eax + 0x198], 0
jne 0x522dcf
mov eax, dword [0x591088]
mov eax, dword [eax]
cmp byte [eax + 0xc0], 0
je 0x522dfc
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x1dc]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x1a0]
mov eax, dword [0x5913d4]
mov eax, dword [eax]
call fcn.0045ccd0
test al, al
je 0x522dfc
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0x30]
mov edx, dword [edx + 4]
mov ecx, dword [0x50dce0]
call fcn.0040865c
mov eax, dword [ebp - 0x18]
call fcn.00408460
test eax, eax
je 0x522dfc
mov eax, dword [ebp - 0x18]
call fcn.00408468
test eax, eax
jl 0x522dfc
inc eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
lea eax, [eax + eax*8]
mov edx, dword [ebp - 0x18]
lea eax, [edx + eax*8]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x591088]
mov eax, dword [eax]
xor edx, edx
mov dl, byte [eax + 0xf0]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x40]
call fcn.0051bf80
test al, al
je 0x522dc1
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
mov eax, dword [0x591088]
mov eax, dword [eax]
call fcn.0047e370
test al, al
jne 0x522dc1
mov eax, dword [ebp - 0x1c]
mov al, byte [eax + 0x34]
sub al, 1
je 0x522a4a
add al, 0xfe
sub al, 3
jb 0x522a4a
sub al, 2
je 0x522a4a
add al, 0xa4
sub al, 3
jae 0x522dc1
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x24], 0
jne 0x522a5b
cmp dword [eax + 0x20], 0
jbe 0x522a84
jmp 0x522a5d
jle 0x522a84
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x84]
mov eax, dword [eax + 0x80]
mov ecx, dword [ebp - 0x1c]
cmp edx, dword [ecx + 0x24]
jne 0x522a7e
cmp eax, dword [ecx + 0x20]
jae 0x522a84
jmp 0x522dc1
jl 0x522dc1
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x2c], 0
jne 0x522a95
cmp dword [eax + 0x28], 0
jbe 0x522abe
jmp 0x522a97
jle 0x522abe
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x84]
mov eax, dword [eax + 0x80]
mov ecx, dword [ebp - 0x1c]
cmp edx, dword [ecx + 0x2c]
jne 0x522ab8
cmp eax, dword [ecx + 0x28]
jb 0x522abe
jmp 0x522dc1
jge 0x522dc1
mov eax, 0x64
call fcn.00404b04
mov edx, dword [ebp - 0x1c]
cmp eax, dword [edx + 0x30]
jl 0x522b16
lea edx, [ebp - 0x48]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
call fcn.0041d5dc
mov ecx, dword [ebp - 0x48]
lea eax, [ebp - 0x44]
mov edx, 0x522eb0
call fcn.004074b8
mov edx, dword [ebp - 0x44]
mov eax, dword [0x590ea0]
mov eax, dword [eax]
xor ecx, ecx
call fcn.00435260
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
mov eax, dword [0x591088]
mov eax, dword [eax]
mov cl, 1
call fcn.0047db80
jmp 0x522dc1
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x30], 0x65
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x44], 0
je 0x522bba
mov eax, dword [0x591088]
mov eax, dword [eax]
cmp dword [eax + 0x17c], 0
je 0x522dc1
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax + 0x44]
mov eax, dword [0x591088]
mov eax, dword [eax]
mov eax, dword [eax + 0x17c]
call fcn.0051bfe0
test al, al
jne 0x522bba
lea edx, [ebp - 0x50]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
call fcn.0041d5dc
mov ecx, dword [ebp - 0x50]
lea eax, [ebp - 0x4c]
mov edx, 0x522ef0
call fcn.004074b8
mov edx, dword [ebp - 0x4c]
mov eax, dword [0x590ea0]
mov eax, dword [eax]
xor ecx, ecx
call fcn.004357f0
push 0
push 0
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + 0xc]
mov edx, 0x56
mov eax, dword [ebp - 4]
call fcn.00526940
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
mov eax, dword [0x591088]
mov eax, dword [eax]
mov cl, 1
call fcn.0047db80
jmp 0x522dc1
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x38], 0
je 0x522c85
mov ecx, 0x51bbe0
mov dl, 1
mov eax, dword [0x5124e8]
call fcn.00512a20
mov dword [ebp - 0x24], eax
xor eax, eax
push ebp
push 0x522c0c
push dword fs:[eax]
mov dword fs:[eax], esp
lea ecx, [ebp - 0x25]
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax + 0x38]
mov eax, dword [ebp - 0x24]
call fcn.00512990
test al, al
jne 0x522c02
mov byte [ebp - 0x25], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x522c1a
mov eax, dword [ebp - 0x24]
call fcn.00404fec
cmp byte [ebp - 0x25], 0
jne 0x522c85
lea edx, [ebp - 0x58]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
call fcn.0041d5dc
mov ecx, dword [ebp - 0x58]
lea eax, [ebp - 0x54]
mov edx, 0x522f30
call fcn.004074b8
mov edx, dword [ebp - 0x54]
mov eax, dword [0x590ea0]
mov eax, dword [eax]
xor ecx, ecx
call fcn.004357f0
push 0
push 0
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + 0xc]
mov edx, 0x4c
mov eax, dword [ebp - 4]
call fcn.00526940
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
mov eax, dword [0x591088]
mov eax, dword [eax]
mov cl, 1
call fcn.0047db80
jmp 0x522dc1
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x34]
call fcn.004065f8
mov eax, dword [ebp - 0x1c]
add eax, 0xc
call fcn.00472100
test al, al
je 0x522cf6
mov eax, dword [ebp - 0x1c]
lea edx, [eax + 0xc]
mov eax, dword [0x591250]
mov eax, dword [eax]
mov eax, dword [eax + 0x440]
call fcn.0056f9b0
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x522dc1
lea eax, [ebp - 0x34]
mov edx, dword [ebp - 8]
mov edx, dword [edx + 0x10]
call fcn.00406a04
xor ecx, ecx
mov dl, 2
mov eax, dword [ebp - 8]
call fcn.0056b940
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x522cf6
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0xc], 0
je 0x522dfc
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x14], 0
je 0x522d4f
push 0xffffffffffffffff
push 0xffffffffffffffff
lea ecx, [ebp - 0x5c]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x1b8]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x14]
call fcn.00490cb0
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x134]
call fcn.00492ac0
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x522dc1
mov eax, dword [ebp - 0x10]
call fcn.00460ac0
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0xc], 0
je 0x522dfc
jmp 0x522d54
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x18]
push eax
mov eax, dword [ebp - 0x1c]
add eax, 0xc
push eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x3c]
push eax
mov eax, dword [ebp - 0x1c]
mov al, byte [eax + 0x34]
push eax
mov eax, dword [ebp - 4]
add eax, 0x19c
push eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
call fcn.0050e3b0
test al, al
je 0x522dfc
mov eax, dword [0x5913d4]
mov eax, dword [eax]
mov eax, dword [eax + 0x78]
mov edx, dword [ebp - 4]
mov dword [edx + 0x198], eax
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
mov eax, dword [0x591088]
mov eax, dword [eax]
mov cl, 1
call fcn.0047db80
jmp 0x522dfc
inc dword [ebp - 0xc]
dec dword [ebp - 0x38]
jne 0x5229e2
jmp 0x522dfc
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x19c]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x198]
mov eax, dword [0x5913d4]
mov eax, dword [eax]
call fcn.0045ccd0
test al, al
je 0x522dfc
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x198], edx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x522e49
lea eax, [ebp - 0x5c]
call fcn.0040661c
lea eax, [ebp - 0x58]
mov edx, 6
call fcn.00406658
lea eax, [ebp - 0x40]
mov edx, 2
call fcn.00406688
lea eax, [ebp - 0x34]
call fcn.004065f8
lea eax, [ebp - 0x18]
mov edx, dword [0x50dce0]
call fcn.00408620
ret