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

Disassembly:
sub esp, 0x84
mov eax, dword [esp + 0x88]
push ebx
push ebp
push esi
push edi
mov esi, ecx
push eax
mov dword [esp + 0x30], esi
call fcn.0046e1c0
xor edi, edi
cmp eax, edi
jne 0x46e912
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret 0xc
mov ecx, dword [esp + 0x9c]
mov edx, dword [eax + 0x10]
push ecx
push edx
lea ecx, [esp + 0x28]
call fcn.004ad520
lea eax, [esp + 0x20]
lea ecx, [esp + 0x24]
neg eax
sbb eax, eax
and eax, ecx
mov edx, dword [eax]
lea eax, [esp + 0x14]
push edx
push eax
call fcn.004acc20
mov eax, dword [esp + 0xa8]
add esp, 8
lea edx, [esp + 0x30]
mov dword [esp + 0x30], 0x30000000
mov ecx, dword [eax]
push edx
lea edx, [esp + 0xa0]
mov dword [esp + 0x2c], edi
push edx
push 1
push eax
call dword [ecx + 0x24]
test eax, eax
jl 0x46e999
mov eax, dword [esp + 0x30]
test eax, 0x20000000
je 0x46e999
mov ecx, dword [esi + 0x358]
mov dword [esp + 0x28], 1
cmp ecx, edi
jne 0x46e9e8
test eax, 0x10000000
jne 0x46e9e8
mov dword [esp + 0x28], edi
cmp dword [esi + 0x468], edi
je 0x46e9e8
mov eax, dword [esp + 0x14]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x46e9d0
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x46e9d0
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
lea ecx, [esp + 0x20]
call fcn.004acdf0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret 0xc
lea eax, [esp + 0x10]
push 0x8000
push eax
lea ecx, [esp + 0x28]
call fcn.004ad770
mov eax, dword [esp + 0x10]
cmp dword [eax - 8], edi
jl 0x46ebfd
push 0x4dd7a4
push eax
call fcn.004c546f
add esp, 8
cmp eax, edi
je 0x46ebfd
sub eax, dword [esp + 0x10]
sar eax, 1
cmp eax, edi
jne 0x46ebfd
mov ecx, dword [0x4d9540]
mov edx, str.shell:
test edx, edx
mov dword [esp + 0x1c], ecx
je 0x46ea94
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
test edi, edi
je 0x46ea94
push edi
lea ecx, [esp + 0x20]
call fcn.004012f0
test eax, eax
je 0x46ea94
mov ecx, dword [esp + 0x1c]
lea eax, [edi + 1]
test eax, eax
mov edi, ecx
jne 0x46ea6b
test ecx, ecx
jne 0x46ea89
push eax
push ecx
push 0xffffffffffffffff
push str.shell:
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x46ea89
mov word [edi + eax*2 - 2], 0
push 0xffffffffffffffff
lea ecx, [esp + 0x20]
call fcn.00401970
lea eax, [esp + 0x38]
push 0x8000
push eax
lea ecx, [esp + 0x28]
call fcn.004ad770
mov ecx, dword [0x4d9540]
mov eax, dword [eax]
mov dword [esp + 0x34], ecx
push eax
mov edx, dword [eax - 8]
mov eax, dword [esp + 0x20]
push edx
push eax
mov eax, dword [eax - 8]
lea ecx, [esp + 0x40]
push eax
call fcn.004017b0
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00401200
lea ecx, [esp + 0x34]
call fcn.004014c0
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
cmp ecx, eax
je 0x46eb72
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x46eb05
mov edx, dword [0x4d9544]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x46eb0c
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x46eb53
mov ebx, dword [eax - 8]
lea ecx, [esp + 0x10]
push ebx
mov edi, eax
call fcn.00401420
test eax, eax
je 0x46eb6e
lea eax, [ebx + ebx]
mov esi, edi
mov edi, dword [esp + 0x10]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x2c]
mov dword [ecx - 8], ebx
mov edx, dword [esp + 0x10]
mov word [eax + edx], 0
mov eax, dword [esp + 0x18]
jmp 0x46eb72
lea ecx, [esp + 0x10]
call fcn.0040e950
mov eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x18]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x46eba1
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x46eba7
mov edx, dword [esp + 0x18]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
jmp 0x46eba7
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [esp + 0x1c]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x46ebd2
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x46ebd2
mov edx, dword [esp + 0x1c]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
mov eax, dword [esp + 0x38]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x46ebfd
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x46ebfd
mov edx, dword [esp + 0x38]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov edx, dword [eax - 0xc]
lea ebx, [eax - 0xc]
cmp edx, 1
jg 0x46ec15
mov edx, dword [eax - 4]
test edx, edx
jge 0x46ec71
mov ebp, dword [eax - 8]
test ebp, ebp
jle 0x46ec1e
mov ecx, ebp
push ecx
lea ecx, [esp + 0x18]
call fcn.004012f0
test eax, eax
je 0x46ec71
mov edi, dword [esp + 0x14]
lea ecx, [ebp + ebp + 2]
mov eax, ecx
lea esi, [ebx + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov dword [ecx - 8], ebp
mov eax, dword [0x4d9544]
cmp ebx, eax
je 0x46ec69
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x46ec69
push ebx
call fcn.004c5432
add esp, 4
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + 0x98]
push eax
push edx
push 0
lea ecx, [esp + 0x1c]
call fcn.0040f900
push ecx
mov ecx, esp
push eax
call fcn.0040ea20
mov ecx, esi
call fcn.0046e1e0
mov edi, eax
mov ecx, esi
push edi
call fcn.0046e1c0
mov esi, eax
lea eax, [esp + 0x20]
neg eax
sbb eax, eax
lea ecx, [esp + 0x24]
mov ebx, 1
and eax, ecx
mov dword [esi + 0x14], ebx
mov eax, dword [eax]
push eax
call dword [sym.imp.SHELL32.dll_ILClone]
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x28]
xor ebp, ebp
mov dword [esi + 0x2c], 0xffffffff
cmp eax, ebp
mov dword [esi + 0x68], ebp
je 0x46ece5
or eax, 0xffffffff
mov dword [edi + 0x18], ebx
mov dword [esi + 0x1c], eax
mov dword [esi + 0x68], ebx
jmp 0x46ece8
or eax, 0xffffffff
mov dword [esi + 0x30], ebp
mov dword [esi + 0x28], ebp
mov dword [esi + 0x58], ebx
mov dword [esi + 0x34], ebp
test dword [esp + 0x30], 0x20000000
je 0x46ed04
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov edx, dword [0x4d4418]
mov eax, dword [0x4d441c]
mov ecx, dword [0x4d4420]
mov edi, dword [esp + 0xa0]
mov dword [esp + 0x6c], edx
mov edx, dword [0x4d4424]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], edx
mov dword [esp + 0x7c], 0xc
mov word [esp + 0x4c], bp
mov eax, dword [esi + 0x68]
cmp eax, ebp
jne 0x46edaf
mov eax, dword [edi]
lea ecx, [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0xa0]
lea edx, [esp + 0x70]
push edx
push ecx
push edi
call dword [eax + 0x44]
test eax, eax
jl 0x46edaf
cmp word [esp + 0x4c], 0x15
jne 0x46ed7a
mov edx, dword [esp + 0x54]
mov dword [esi + 0x30], edx
mov eax, dword [esp + 0x58]
mov dword [esi + 0x34], eax
jmp 0x46edaf
push 0x15
lea ecx, [esp + 0x50]
push ebp
lea edx, [esp + 0x44]
push ecx
push edx
mov word [esp + 0x4c], bp
call dword [sym.imp.OLEAUT32.dll_VariantTimeToDosDateTime]
test eax, eax
jl 0x46eda4
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], ecx
lea edx, [esp + 0x3c]
push edx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [0x4d4418]
mov ecx, dword [0x4d441c]
mov edx, dword [0x4d4420]
mov dword [esp + 0x6c], eax
mov eax, dword [0x4d4424]
mov dword [esp + 0x70], ecx
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], eax
xor ebx, ebx
mov edx, dword [edi]
lea ecx, [ebx + 0xe]
lea eax, [esp + 0x4c]
mov dword [esp + 0x7c], ecx
push eax
mov eax, dword [esp + 0xa0]
lea ecx, [esp + 0x70]
push ecx
push eax
push edi
call dword [edx + 0x44]
test eax, eax
jl 0x46ee82
push 7
lea ecx, [esp + 0x50]
push ebp
lea edx, [esp + 0x64]
push ecx
push edx
mov word [esp + 0x6c], bp
call dword [sym.imp.OLEAUT32.dll_VariantTimeToDosDateTime]
test eax, eax
jl 0x46ee77
xor eax, eax
mov edx, dword [esp + 0x68]
mov dword [esp + 0x3e], eax
lea ecx, [esp + 0x3c]
mov dword [esp + 0x42], eax
push ecx
mov dword [esp + 0x4a], eax
push edx
mov word [esp + 0x52], ax
mov eax, dword [esp + 0x6c]
push eax
mov word [esp + 0x48], bp
call dword [sym.imp.OLEAUT32.dll_UnRegisterTypeLib]
cmp ebx, 1
lea edi, [esi + 0x38]
jne 0x46ee54
lea edi, [esi + 0x40]
jmp 0x46ee5c
cmp ebx, 2
jne 0x46ee5c
lea edi, [esi + 0x48]
lea ecx, [esp + 0x3c]
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
push edi
push edi
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
mov edi, dword [esp + 0xa0]
lea edx, [esp + 0x5c]
push edx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
inc ebx
cmp ebx, 3
jl 0x46edd7
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [esp + 0x10]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x46eec6
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x46eec6
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
mov eax, dword [esp + 0x14]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x46eef5
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x46eef5
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
lea ecx, [esp + 0x20]
call fcn.004acdf0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x84
ret 0xc