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

Disassembly:
sub esp, 0x6c
mov eax, dword [esp + 0x70]
push ebx
push ebp
push esi
mov esi, dword [eax + 0xc]
mov edx, dword [eax]
xor ecx, ecx
push edi
cmp esi, ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], edx
jne 0x52148f
pop edi
pop esi
pop ebp
mov eax, 7
pop ebx
add esp, 0x6c
ret
push esi
call fcn.00510c10
push esi
mov dword [esp + 0x20], eax
call fcn.00510c10
mov edi, dword [esp + 0x8c]
mov dword [esp + 0x30], eax
xor eax, eax
add esp, 8
mov ebx, dword [edi + 0x18]
mov al, byte [edi + 4]
mov ecx, dword [edi + 0x1c]
cmp eax, 0x70
mov ebp, dword [ebx]
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x30], ebp
je 0x5215c6
mov edx, dword [esp + 0x10]
mov dword [esp + 0x84], 1
mov al, byte [edx + 0x1e]
test al, al
jne 0x5215c6
mov edx, ebp
shl edx, 4
mov dword [esp + 0x34], edx
jmp 0x5214f8
mov edx, dword [esp + 0x34]
mov eax, dword [edi]
mov ecx, dword [esp + 0x84]
cmp ecx, dword [eax]
jg 0x5215c2
mov ecx, dword [ebx + 0xc]
xor eax, eax
test edx, edx
jle 0x52153d
add ecx, 0xa
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x38]
xor edx, edx
mov dx, word [ecx]
mov ecx, dword [esp + 0x84]
cmp edx, ecx
je 0x52153d
mov edx, dword [esp + 0x38]
inc eax
add edx, 0x10
cmp eax, ebp
mov dword [esp + 0x38], edx
jl 0x521519
cmp eax, ebp
jne 0x5215a4
mov edx, dword [esp + 0x80]
push 0
push 0
push 0
push 0x81
push edx
call fcn.0050f380
add esp, 0x14
test eax, eax
je 0x52167f
mov edx, dword [esp + 0x80]
mov ecx, dword [esp + 0x84]
or byte [eax + 3], 8
push 0
push eax
push ebx
push edx
mov dword [eax + 0x24], ecx
call fcn.0050f780
mov dx, word [esp + 0x94]
mov ebx, eax
mov eax, dword [esp + 0x44]
add esp, 0x10
mov ecx, dword [ebx + 0xc]
inc ebp
mov word [ecx + eax + 0xa], dx
add eax, 0x10
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x84]
inc edx
mov cl, byte [eax + 0x1e]
mov dword [esp + 0x84], edx
test cl, cl
je 0x5214f4
mov dword [esp + 0x30], ebp
mov edx, dword [esp + 0x10]
lea ecx, [ebp*4]
push ecx
push edx
call fcn.004ee570
add esp, 8
mov dword [esp + 0x48], eax
test eax, eax
je 0x521728
mov ecx, dword [ebx + 0xc]
test ebp, ebp
jle 0x521618
add ecx, 0xa
mov dword [esp + 0x84], ebp
xor edx, edx
add eax, 4
mov dx, word [ecx]
add ecx, 0x10
dec edx
mov dword [eax - 4], edx
mov edx, dword [esp + 0x84]
dec edx
mov dword [esp + 0x84], edx
jne 0x5215f8
mov ecx, dword [esp + 0x10]
lea eax, [ebp + ebp*4 + 0x10]
push eax
push ecx
call fcn.004ee570
mov ecx, eax
add esp, 8
test ecx, ecx
mov dword [esp + 0x2c], ecx
je 0x521730
mov eax, dword [esp + 0x10]
lea edx, [ecx + ebp*4 + 0xc]
mov dword [ecx + 8], edx
mov word [ecx + 6], bp
mov edx, dword [eax + 8]
mov dword [esp + 0x84], 0
test ebp, ebp
mov eax, dword [edx + 0x14]
mov dl, byte [eax + 0x49]
mov byte [ecx + 4], dl
jle 0x521730
mov eax, dword [esp + 0x48]
lea edx, [ecx + 0xc]
mov dword [esp + 0x24], 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], edx
jmp 0x521694
pop edi
mov dword [esp + 0x2c], ebp
pop esi
pop ebp
mov eax, 7
pop ebx
add esp, 0x6c
ret
mov ecx, dword [esp + 0x2c]
mov eax, dword [ebx + 0xc]
mov edx, dword [esp + 0x24]
mov eax, dword [edx + eax]
mov dword [esp + 0x44], eax
test byte [eax + 3], 1
je 0x5216ad
mov eax, dword [eax + 4]
jmp 0x5216d4
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x80]
mov ecx, dword [eax]
push ecx
push edi
push edx
call fcn.00521420
mov ecx, dword [esp + 0x50]
add esp, 0xc
or byte [ecx + 3], 1
mov dword [ecx + 4], eax
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
mov dword [edx], eax
mov eax, dword [ebx + 0xc]
mov edx, dword [esp + 0x24]
mov ecx, dword [ecx + 8]
mov dl, byte [edx + eax + 8]
mov eax, dword [esp + 0x84]
mov byte [ecx + eax], dl
mov edx, dword [esp + 0x38]
mov ecx, 4
inc eax
add edx, ecx
mov dword [esp + 0x84], eax
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x34]
add edx, ecx
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x24]
add edx, 0x10
cmp eax, ebp
mov dword [esp + 0x24], edx
jl 0x521690
jmp 0x521730
mov dword [esp + 0x2c], 0
mov dword [edi + 0x18], ebx
push ebx
mov ebx, dword [esp + 0x84]
mov eax, dword [ebx]
push eax
call fcn.00514c20
mov ebp, dword [esp + 0x28]
add esp, 8
mov dword [ebp + 0x18], eax
mov eax, dword [esp + 0x14]
cmp eax, 0x70
jne 0x521761
xor eax, eax
mov dword [esp + 0x38], eax
jmp 0x521806
mov ecx, dword [edi]
mov ebp, dword [ecx]
lea edx, [ebp + 1]
push edx
push ebx
call fcn.005136b0
push eax
push 0
push 0x31
push esi
mov dword [esp + 0x50], eax
call fcn.005107e0
mov ecx, dword [esp + 0x28]
lea eax, [ebp + ebp*4 + 0x10]
push eax
push ecx
call fcn.004f8060
add esp, 0x20
mov dword [esp + 0x1c], eax
test eax, eax
je 0x521800
mov ecx, dword [esp + 0x10]
lea edx, [eax + ebp*4 + 0xc]
mov dword [eax + 8], edx
mov word [eax + 6], bp
mov edx, dword [ecx + 8]
xor ebx, ebx
test ebp, ebp
mov ecx, dword [edx + 0x14]
mov dl, byte [ecx + 0x49]
mov byte [eax + 4], dl
jle 0x5217f9
add eax, 0xc
mov dword [esp + 0x84], eax
mov ecx, dword [esp + 0x80]
push ebx
push edi
push ecx
call fcn.00521420
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x28]
add esp, 0xc
inc ebx
mov dword [ecx], eax
mov eax, dword [edx + 8]
add ecx, 4
cmp ebx, ebp
mov byte [eax + ebx - 1], 0
mov dword [esp + 0x84], ecx
jl 0x5217c3
mov ebx, dword [esp + 0x80]
mov ebp, dword [esp + 0x20]
xor eax, eax
mov dword [edi + 0x1c], eax
mov dword [ebp + 0x24], eax
mov ecx, dword [edi + 0x18]
push str.ORDER
push ecx
push edi
push ebx
call fcn.00514a80
mov eax, dword [ebp + 0x1c]
add esp, 0x10
test eax, eax
jne 0x521839
mov edx, dword [ebp + 0x18]
push str.ORDER
push edx
push ebp
push ebx
call fcn.00514a80
add esp, 0x10
mov eax, dword [esp + 0x18]
push eax
push edi
push ebx
call fcn.00520c80
mov ecx, dword [edi + 0x30]
xor eax, eax
add esp, 0xc
cmp ecx, eax
je 0x521894
cmp dword [esp + 0x14], 0x70
jne 0x521894
mov ebp, dword [ebx + 0x48]
inc ebp
mov dword [esp + 0x44], ebp
lea eax, [ebp + 1]
mov dword [ebx + 0x48], eax
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0x34]
test eax, eax
je 0x521874
inc eax
jmp 0x521877
mov eax, dword [edi + 0x30]
push ebp
push eax
push 0x15
push esi
call fcn.005107e0
mov ecx, dword [esp + 0x44]
push ecx
push ebp
push 0x15
push esi
call fcn.005107e0
add esp, 0x20
jmp 0x52189c
mov dword [esp + 0x34], eax
mov dword [esp + 0x44], eax
mov edx, dword [edi + 0x28]
mov ebp, dword [esp + 0x10]
push edx
push ebp
call fcn.00507ff0
mov eax, dword [edi + 0x2c]
mov dword [edi + 0x28], 0
push eax
push ebp
call fcn.00507ff0
mov dword [edi + 0x2c], 0
mov ebp, dword [ebx + 0x48]
inc ebp
mov ecx, dword [esp + 0x90]
push ebp
lea edx, [esp + 0x80]
lea ebx, [ebp + 1]
push 0xa
push edx
lea eax, [ebx + 2]
mov dword [esp + 0xa0], eax
add eax, 2
mov dword [esp + 0x5c], eax
mov dword [ecx + 0x48], eax
call fcn.0051dd00
lea eax, [ebx + 1]
push eax
lea eax, [esp + 0x7c]
push 0xa
push eax
call fcn.0051dd00
push 0x61
push esi
call fcn.00511ad0
push esi
mov dword [esp + 0x80], eax
call fcn.00510c90
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x54]
lea edx, [esp + 0xa0]
push edx
push eax
mov dword [eax + 0x30], ecx
mov eax, dword [esp + 0xbc]
push eax
call fcn.0051f0e0
add esp, 0x40
push ebx
push 1
push 0x31
push esi
call fcn.005107e0
push ebp
push 0x3d
push esi
call fcn.00510bf0
push esi
call fcn.00510c90
mov ecx, dword [edi + 0x30]
mov edx, dword [edi + 0x34]
mov dword [esp + 0x64], ecx
lea ecx, [esp + 0x7c]
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0xa0]
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x54]
push ecx
push edi
push edx
mov dword [edi + 0x30], eax
mov dword [edi + 0x34], 0
call fcn.0051f0e0
mov edx, dword [esp + 0xb0]
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x50]
push edx
push 1
mov dword [edi + 0x30], eax
mov dword [edi + 0x34], ecx
push 0x31
push esi
call fcn.005107e0
lea eax, [ebx + 1]
push eax
push 0x3d
push esi
call fcn.00510bf0
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x80]
add esp, 0x48
push eax
mov eax, dword [esp + 0x88]
push 0xfffffffffffffff0
push ecx
mov ecx, dword [esp + 0x94]
inc eax
push edx
push eax
mov eax, dword [esp + 0x94]
lea edx, [esp + 0x80]
push ecx
push edx
push edi
push eax
call fcn.00521d70
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x38]
add esp, 0x24
cmp eax, 0x70
je 0x521a10
cmp eax, 0x6f
jne 0x521a4c
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x44]
push 0xffffffffffffffef
push edx
mov edx, dword [esp + 0x94]
push eax
push ecx
mov ecx, dword [esp + 0x94]
lea eax, [esp + 0x70]
push edx
push eax
push edi
push ecx
call fcn.00521d70
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x38]
add esp, 0x24
cmp eax, 0x71
je 0x521aa1
cmp eax, 0x72
je 0x521aa1
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x84]
push edx
push eax
push 0xb
push esi
call fcn.005107e0
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
push ecx
push edx
push 0x30
push esi
mov dword [esp + 0x3c], eax
call fcn.005107e0
lea eax, [ebx + 1]
push eax
push 0x3d
push esi
call fcn.00510bf0
mov eax, dword [esp + 0x48]
push eax
push 0
push 0x61
push esi
call fcn.005107e0
add esp, 0x3c
jmp 0x521ab7
mov ecx, dword [esp + 0x18]
push ecx
push 0
push 0x61
push esi
call fcn.005107e0
add esp, 0x10
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x14], 0x72
jne 0x521ac8
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x24], edx
jmp 0x521b0d
mov eax, dword [esp + 0x18]
push eax
push ebx
push 0xb
push esi
call fcn.005107e0
mov edx, dword [esp + 0x94]
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x34], eax
push ecx
lea eax, [edx + 1]
push eax
push 0x30
push esi
call fcn.005107e0
push ebp
push 0x3d
push esi
call fcn.00510bf0
mov eax, dword [esp + 0x50]
push eax
push 0
push 0x61
push esi
call fcn.005107e0
add esp, 0x3c
mov edx, dword [esp + 0x84]
mov ecx, dword [esp + 0x44]
push ecx
lea eax, [edx + 1]
push eax
push 0x30
push esi
call fcn.005107e0
push ebp
push 0x3d
push esi
mov dword [esp + 0x50], eax
call fcn.00510bf0
mov eax, dword [esp + 0x38]
push eax
push ebx
push 0xb
push esi
call fcn.005107e0
mov ecx, dword [esp + 0x54]
push ecx
push 0
push 0x61
push esi
call fcn.005107e0
mov eax, dword [esp + 0x50]
add esp, 0x3c
cmp eax, 0x70
jne 0x521b65
mov edx, dword [esp + 0x34]
mov dword [esp + 0x44], edx
jmp 0x521ba6
cmp eax, 0x72
jne 0x521b79
mov eax, dword [esp + 0x34]
mov dword [esp + 0x44], eax
inc eax
mov dword [esp + 0x34], eax
jmp 0x521ba6
push ebp
push 0x3d
push esi
call fcn.00510bf0
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x28]
push eax
push ebx
push 0xb
push esi
call fcn.005107e0
mov ecx, dword [esp + 0x44]
push ecx
push 0
push 0x61
push esi
call fcn.005107e0
add esp, 0x2c
push esi
call fcn.00510c90
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x18]
add esp, 4
cmp eax, 0x70
je 0x521bc1
cmp eax, 0x6f
jne 0x521bd6
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
push edx
push eax
push 0x30
push esi
call fcn.005107e0
add esp, 0x10
lea eax, [ebx + 1]
push eax
push 0x3d
push esi
call fcn.00510bf0
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x90]
push ecx
push edx
push 0xb
push esi
call fcn.005107e0
mov eax, dword [esp + 0x44]
push eax
push 0
push 0x61
push esi
call fcn.005107e0
mov ecx, dword [esp + 0x78]
push ecx
push esi
call fcn.00510ca0
push ebx
push 0
push 0x31
push esi
call fcn.005107e0
mov edx, dword [esp + 0xc8]
add esp, 0x44
push edx
push 0
push 0x31
push esi
call fcn.005107e0
mov eax, dword [esp + 0x60]
push eax
push ebp
push 0x30
push esi
call fcn.005107e0
mov ecx, dword [esp + 0x74]
lea eax, [ebx + 1]
push ecx
push eax
push 0x30
push esi
call fcn.005107e0
mov edx, dword [esp + 0x4c]
push edx
push ebx
push 0xb
push esi
call fcn.005107e0
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0xc4]
add esp, 0x40
push eax
push ecx
push 0xb
push esi
call fcn.005107e0
mov edx, dword [esp + 0x38]
push edx
push esi
call fcn.00510c70
mov eax, dword [esp + 0x60]
push 0xfffffffffffffff1
push eax
push 0
push 0
push 0
push 0x83
push esi
call fcn.0050fb10
mov ecx, dword [esp + 0x60]
mov ebx, dword [esp + 0x64]
mov edx, dword [esp + 0x98]
push 0xfffffffffffffff0
push ecx
push ebx
push edx
mov eax, dword [esp + 0xb8]
push eax
push 0x60
push esi
call fcn.0050fb10
mov ecx, dword [esp + 0xa8]
mov edx, dword [esp + 0x94]
mov eax, dword [esp + 0x84]
add esp, 0x50
push ecx
push edx
push eax
push 0x81
push esi
call fcn.0050fb50
mov eax, dword [esp + 0x4c]
add esp, 0x14
test eax, eax
je 0x521d01
mov ecx, dword [esp + 0x80]
inc ebx
push ebx
push eax
push ecx
call fcn.00513700
add esp, 0xc
mov edx, dword [esp + 0x18]
push edx
push esi
call fcn.00510c70
mov eax, dword [esp + 0x90]
mov esi, dword [esp + 0x28]
add esp, 8
cmp byte [eax], 5
jne 0x521d46
mov eax, dword [esi + 0x1c]
mov ecx, esi
test eax, eax
je 0x521d31
mov ecx, eax
mov eax, dword [ecx + 0x1c]
test eax, eax
jne 0x521d28
mov ecx, dword [ecx]
mov edx, dword [esp + 0x80]
push ecx
push 0
push edx
call fcn.00520a50
add esp, 0xc
mov eax, dword [edi + 0x1c]
test eax, eax
je 0x521d5b
push eax
mov eax, dword [esp + 0x14]
push eax
call fcn.0050b890
add esp, 8
mov dword [edi + 0x1c], esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x6c
ret