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

Disassembly:
push 0xffffffffffffffff
push 0x8686d8
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push ebp
push esi
push edi
mov eax, dword [0x8ce6f4]
xor eax, esp
push eax
lea eax, [esp + 0x5c]
mov dword fs:[0], eax
mov dword [esp + 0x28], ecx
xor ebx, ebx
mov dword [esp + 0x64], ebx
call fcn.007cff5d
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x521d9b
push 0x80004005
call fcn.004a8210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
push ebx
push ebx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x6c], 1
call fcn.005d4530
mov dword [esp + 0x34], 0x40cc00
mov dword [esp + 0x40], 0x40cbc4
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov eax, dword [esp + 0x38]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push eax
mov byte [esp + 0x68], 2
call edx
lea eax, [esp + 0x20]
push eax
push 0x40d394
lea ecx, [esp + 0x1c]
push ecx
xor ebp, ebp
lea ecx, [esp + 0x78]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebp
call fcn.004b65f0
mov edi, dword [esp + 0x14]
mov byte [esp + 0x64], 3
cmp dword [edi - 0xc], ebx
je 0x521f54
cmp ebp, ebx
je 0x521ea6
cmp ebp, 1
jne 0x521e93
mov ecx, 0x405084
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x521e5e
cmp dx, bx
je 0x521e5a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x521e5e
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x521e38
xor eax, eax
jmp 0x521e63
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
setne al
test al, al
je 0x521ea6
lea edx, [esp + 0x4c]
push edx
push ecx
lea eax, [edi - 0x10]
mov dword [esp + 0x38], esp
mov esi, esp
push eax
call fcn.004a9b50
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.005c5e00
add esp, 8
jmp 0x521ea6
cmp ebp, 2
jne 0x521ea6
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
call fcn.004aa540
lea ecx, [esp + 0x20]
push ecx
push 0x40d394
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x78]
call fcn.004b65f0
mov ecx, dword [eax]
mov esi, dword [esp + 0x14]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
mov byte [esp + 0x64], 4
cmp eax, esi
je 0x521f1d
cmp dword [esi + 0xc], ebx
lea edi, [esi + 0xc]
jl 0x521f0f
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x521f0f
push eax
call fcn.004a9b50
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x521f02
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x24]
jmp 0x521f1d
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.004a8db0
mov eax, dword [esp + 0x2c]
inc ebp
add eax, 0xfffffff0
mov dword [esp + 0x24], ebp
mov byte [esp + 0x64], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x521f47
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x14]
cmp dword [edi - 0xc], ebx
jne 0x521e28
lea eax, [edi - 0x10]
mov byte [esp + 0x64], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x521f75
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx + 0x20]
push ebx
push 0x323
push 0x111
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esp + 0x1c], ebx
lea eax, [esp + 0x1c]
push eax
push 0x431070
lea ecx, [esp + 0x48]
push ecx
mov byte [esp + 0x70], 5
call dword [sym.imp.ole32.dll_OleLoadFromStream]
push 0x28
call fcn.007c8529
add esp, 4
cmp eax, ebx
je 0x521fc5
mov ecx, eax
call fcn.004f2bf0
mov edi, eax
jmp 0x521fc7
xor edi, edi
mov dword [esp + 0x20], edi
mov byte [esp + 0x64], 6
cmp edi, ebx
je 0x522063
mov eax, dword [esp + 0x18]
mov esi, dword [edi + 0x20]
add eax, 0xfffffff0
sub esi, 0x10
cmp eax, esi
je 0x52203a
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x522027
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x522027
push eax
call fcn.004a9b50
mov dword [esp + 0x28], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x52201b
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [esp + 0x24]
add ecx, 0x10
mov dword [edi + 0x20], ecx
jmp 0x522038
mov eax, dword [esp + 0x18]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [edi + 0x20]
call fcn.004a8db0
xor ebx, ebx
mov eax, dword [esp + 0x1c]
cmp dword [edi + 0x24], eax
je 0x522063
mov esi, eax
cmp eax, ebx
je 0x522051
mov edx, dword [eax]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [edi + 0x24]
cmp eax, ebx
je 0x522060
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [edi + 0x24], esi
push ecx
mov ecx, dword [esp + 0x2c]
mov eax, esp
mov dword [esp + 0x34], esp
mov dword [esp + 0x24], ebx
mov dword [eax], edi
call fcn.005219e0
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x64], 2
cmp eax, ebx
je 0x52208e
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x4c]
mov byte [esp + 0x64], 1
cmp eax, ebx
je 0x5220a4
push eax
call fcn.00803053
add esp, 4
lea ecx, [esp + 0x38]
call fcn.005d4480
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x64], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5220d2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x6c]
add eax, 0xfffffff0
mov dword [esp + 0x64], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5220fa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 4