Function at 0x10019c6
Capabilities:
Access pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1060
call fcn.010027a0
mov eax, dword [0x10040c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor esi, esi
push esi
push esi
xor edi, edi
inc edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_HeapSetInformation]
mov eax, dword [ebp + 8]
mov dword [0x10040e4], eax
mov eax, dword [sym.imp.msvcrt.dll___argc]
cmp dword [eax], edi
mov dword [ebp - 0xc30], esi
mov dword [ebp - 0xc38], esi
mov dword [ebp - 0xc44], esi
mov dword [ebp - 0xc40], esi
mov dword [ebp - 0xc48], edi
mov dword [ebp - 0xc50], esi
mov dword [ebp - 0xc54], esi
mov dword [ebp - 0xc4c], 0x1004000
mov dword [ebp - 0xc3c], str.DllRegisterServer
mov dword [ebp - 0xc2c], esi
mov dword [ebp - 0xc20], edi
jle 0x1001f57
mov edi, 0x105
mov eax, dword [sym.imp.msvcrt.dll___wargv]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc20]
mov ebx, dword [eax + ecx*4]
movzx eax, word [ebx]
cmp ax, 0x2d
mov dword [ebp - 0xc60], ebx
je 0x1001c28
cmp ax, 0x2f
je 0x1001c28
cmp ax, 0x22
jne 0x1001bee
lea eax, [ebx + 2]
push eax
mov dword [ebp - 0xc28], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 0x104
mov dword [ebp - 0xc24], eax
jg 0x1001e4e
push dword [ebp - 0xc28]
lea eax, [ebp - 0x210]
push edi
push eax
call sub.msvcrt.dll_wcscpy_s
mov eax, dword [ebp - 0xc24]
add esp, 0xc
cmp eax, esi
jle 0x1001b7a
cmp word [ebp + eax*2 - 0x212], 0x22
jmp 0x1001b5f
mov eax, dword [sym.imp.msvcrt.dll___wargv]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc20]
push dword [eax + ecx*4]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + ebx + 1]
cmp eax, 0x104
jg 0x1001e7a
push 0x10012ec
lea eax, [ebp - 0x210]
push edi
push eax
call sub.msvcrt.dll_wcscat_s
mov eax, dword [sym.imp.msvcrt.dll___wargv]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc20]
push dword [eax + ecx*4]
lea eax, [ebp - 0x210]
push edi
push eax
call sub.msvcrt.dll_wcscat_s
add esp, 0x18
cmp ebx, esi
jle 0x1001b61
mov eax, dword [sym.imp.msvcrt.dll___wargv]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc20]
mov eax, dword [eax + ecx*4]
cmp word [eax + ebx*2 - 2], 0x22
je 0x1001b7a
inc dword [ebp - 0xc20]
mov ecx, dword [ebp - 0xc20]
mov eax, dword [sym.imp.msvcrt.dll___argc]
cmp ecx, dword [eax]
jl 0x1001adf
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, esi
jle 0x1001b9b
lea ecx, [ebp + eax*2 - 0x212]
cmp word [ecx], 0x22
jne 0x1001b9b
mov word [ecx], si
lea ebx, [eax + 1]
lea eax, [ebx + ebx]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, esi
mov dword [ebp - 0xc28], eax
je 0x1001e11
cmp dword [ebp - 0xc2c], 0xff
je 0x1001eb2
lea ecx, [ebp - 0x210]
push ecx
push ebx
push eax
call sub.msvcrt.dll_wcscpy_s
mov eax, dword [ebp - 0xc28]
mov ecx, dword [ebp - 0xc2c]
add esp, 0xc
mov dword [ebp + ecx*4 - 0x1060], eax
jmp 0x1001c1d
cmp dword [ebp - 0xc2c], 0xff
je 0x1001eb2
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 0x104
jg 0x1001ecb
mov eax, dword [ebp - 0xc2c]
mov dword [ebp + eax*4 - 0x1060], ebx
inc dword [ebp - 0xc2c]
jmp 0x1001e11
movzx eax, word [ebx + 2]
cmp eax, 0x63
jg 0x1001c44
je 0x1001e11
sub eax, 0x43
je 0x1001e11
dec eax
dec eax
jmp 0x1001c47
sub eax, 0x65
je 0x1001e07
sub eax, 4
je 0x1001cb3
sub eax, 5
je 0x1001ca8
sub eax, 5
je 0x1001c99
dec eax
dec eax
je 0x1001c76
dec eax
jne 0x1001ec0
mov dword [ebp - 0xc38], 1
jmp 0x1001e11
mov dword [ebp - 0xc44], 1
mov dword [ebp - 0xc4c], 0x1004060
mov dword [ebp - 0xc3c], str.DllUnregisterServer
jmp 0x1001e11
mov dword [0x10040e0], 1
jmp 0x1001e11
mov dword [ebp - 0xc48], esi
jmp 0x1001e11
cmp word [ebx + 4], 0x3a
mov dword [ebp - 0xc40], 1
jne 0x1001df0
lea eax, [ebx + 6]
cmp word [eax], 0x22
mov dword [ebp - 0xc28], eax
jne 0x1001dd5
add ebx, 8
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 0x104
jg 0x1001ecb
cmp eax, esi
jle 0x1001d07
lea eax, [ebx + eax*2 - 2]
cmp word [eax], 0x22
jne 0x1001d07
mov word [eax], si
push ebx
jmp 0x1001df5
push ebx
lea eax, [ebp - 0x41c]
push edi
push eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
jmp 0x1001d8a
mov eax, dword [sym.imp.msvcrt.dll___wargv]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc20]
mov ebx, dword [eax + ecx*4]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0xc24], eax
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0xc24]
lea eax, [eax + ecx + 1]
cmp eax, 0x104
jg 0x1001f08
mov eax, ecx
cmp eax, esi
jle 0x1001d67
cmp word [ebx + eax*2 - 2], 0x22
je 0x1001da5
push 0x10012ec
lea eax, [ebp - 0x41c]
push edi
push eax
call sub.msvcrt.dll_wcscat_s
push ebx
lea eax, [ebp - 0x41c]
push edi
push eax
call sub.msvcrt.dll_wcscat_s
add esp, 0x18
inc dword [ebp - 0xc20]
mov ecx, dword [ebp - 0xc20]
mov eax, dword [sym.imp.msvcrt.dll___argc]
cmp ecx, dword [eax]
jl 0x1001d1a
jmp 0x1001e11
mov eax, dword [ebp - 0xc24]
push 0x10012ec
mov word [ebx + eax*2 - 2], si
lea eax, [ebp - 0x41c]
push edi
push eax
call sub.msvcrt.dll_wcscat_s
push ebx
lea eax, [ebp - 0x41c]
push edi
push eax
call sub.msvcrt.dll_wcscat_s
add esp, 0x18
jmp 0x1001e11
push dword [ebp - 0xc28]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 0x104
jg 0x1001e4e
push dword [ebp - 0xc28]
jmp 0x1001df5
push 0x10012e8
lea eax, [ebp - 0x41c]
push edi
push eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
jmp 0x1001e11
mov dword [ebp - 0xc50], 1
inc dword [ebp - 0xc20]
mov eax, dword [sym.imp.msvcrt.dll___argc]
mov ecx, dword [ebp - 0xc20]
cmp ecx, dword [eax]
jl 0x1001a55
cmp dword [ebp - 0xc48], esi
jne 0x1001f3e
cmp dword [ebp - 0xc40], esi
jne 0x1001f3e
push esi
push 1
push esi
push esi
push 0x10012a0
jmp 0x1001ebc
push esi
push 0x400
lea eax, [ebp - 0xc1c]
push eax
push esi
push 0xce
push esi
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x1001f00
add ebx, 6
jmp 0x1001eee
push esi
push 0x400
lea eax, [ebp - 0xc1c]
push eax
push esi
push 0xce
push esi
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x1001f00
push esi
push esi
lea eax, [ebp - 0xc1c]
push esi
push eax
lea eax, [ebp - 0x210]
jmp 0x1001f3b
push esi
push 1
push esi
push esi
push 0x1001260
push 2
jmp 0x1001efb
push esi
push ebx
push 2
call fcn.0100181f
jmp 0x1001f00
push esi
push 0x400
lea eax, [ebp - 0xc1c]
push eax
push esi
push 0xce
push esi
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x1001f00
push esi
push esi
push esi
lea eax, [ebp - 0xc1c]
push eax
push ebx
push 7
call fcn.01001726
xor eax, eax
inc eax
jmp 0x100241a
push esi
push 0x400
lea eax, [ebp - 0xc1c]
push eax
push esi
push 0xce
push esi
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x1001f00
push esi
push esi
lea eax, [ebp - 0xc1c]
push esi
push eax
lea eax, [ebp - 0x41c]
push eax
jmp 0x1001ef9
cmp dword [ebp - 0xc2c], esi
jne 0x1001f61
cmp dword [ebp - 0xc38], esi
je 0x1001f57
push esi
push esi
push esi
push esi
push esi
push 4
jmp 0x1001efb
push esi
push 1
push esi
push esi
push esi
push 5
jmp 0x1001efb
push esi
call dword [sym.imp.ole32.dll_OleInitialize]
test eax, eax
jge 0x1001f80
push esi
push esi
push esi
push esi
push esi
push 6
call fcn.01001726
push 2
pop eax
jmp 0x100241a
cmp dword [0x10040e0], esi
je 0x1001f90
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov dword [ebp - 0xc28], esi
mov eax, dword [ebp - 0xc28]
cmp eax, dword [ebp - 0xc2c]
jge 0x100240e
mov eax, dword [ebp + eax*4 - 0x1060]
mov dword [ebp - 0xc20], eax
mov dword [ebp - 0xc58], eax
mov dword [ebp - 0xc24], eax
lea eax, [ebp - 0xc20]
push eax
call fcn.01001863
cmp eax, 1
mov dword [ebp - 0xc38], eax
jne 0x1002038
push 0x100125c
push 0x20
push dword [ebp - 0xc4c]
call sub.msvcrt.dll_strcat_s
push 0x1001254
push 0x20
push dword [ebp - 0xc3c]
call sub.msvcrt.dll_wcscat_s
add esp, 0x18
push esi
push esi
mov ebx, 0x104
push ebx
mov edi, 0x10040e8
push edi
push dword [ebp - 0xc24]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push dword [ebp - 0xc24]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x100238f
mov dword [ebp - 0xc24], edi
jmp 0x100203d
mov ebx, 0x104
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 8
push esi
push dword [ebp - 0xc20]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push edi
mov dword [ebp - 0xc34], eax
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
cmp dword [ebp - 0xc34], 0x20
jb 0x100239b
push dword [ebp - 0xc34]
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
cmp eax, esi
je 0x10020a5
test word [eax + 0x5e], 0x100
je 0x10020a5
push 4
lea eax, [ebp - 0xc64]
push eax
push 0x22
push 0xffffffffffffffff
mov dword [ebp - 0xc64], 0xd
call dword [sym.imp.ntdll.dll_NtSetInformationProcess]
cmp dword [ebp - 0xc44], esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
jne 0x1002141
cmp dword [ebp - 0xc48], esi
je 0x1002139
cmp dword [ebp - 0xc38], esi
je 0x10020f1
push 0x100123c
push dword [ebp - 0xc34]
call edi
cmp eax, esi
je 0x10020ea
mov dword [ebp - 0xc5c], eax
mov dword [ebp - 0xc54], 1
jmp 0x10020ff
push 0x1001228
jmp 0x10020f7
push dword [ebp - 0xc4c]
push dword [ebp - 0xc34]
call edi
cmp eax, esi
je 0x10021ed
cmp dword [ebp - 0xc54], esi
je 0x100211d
push dword [ebp - 0xc58]
call dword [ebp - 0xc5c]
jmp 0x1002131
cmp dword [ebp - 0xc38], esi
je 0x100212f
push dword [ebp - 0xc24]
call eax
jmp 0x1002131
call eax
cmp eax, esi
jl 0x100225b
cmp dword [ebp - 0xc44], esi
jne 0x1002187
cmp dword [ebp - 0xc40], esi
je 0x100217b
push 0x1001190
push dword [ebp - 0xc34]
call edi
cmp eax, esi
je 0x1002289
lea ecx, [ebp - 0x41c]
push ecx
xor ecx, ecx
cmp dword [ebp - 0xc44], esi
sete cl
push ecx
call eax
cmp eax, esi
jl 0x1002306
cmp dword [ebp - 0xc44], esi
jne 0x10020b7
cmp dword [ebp - 0xc50], esi
jne 0x1002378
cmp dword [ebp - 0xc48], esi
je 0x1002347
push dword [ebp - 0xc3c]
lea eax, [ebp - 0x210]
push ebx
push eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
cmp dword [ebp - 0xc40], esi
je 0x1002364
push 0x100121c
lea eax, [ebp - 0x210]
push ebx
push eax
call sub.msvcrt.dll_wcscat_s
push 0x100119c
lea eax, [ebp - 0x210]
push ebx
push eax
call sub.msvcrt.dll_wcscat_s
add esp, 0x18
jmp 0x1002364
push 0x100
lea eax, [ebp - 0x208]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push dword [ebp - 0xc20]
call sub.msvcrt.dll__wsplitpath_s
add esp, 0x24
cmp dword [ebp - 0xc38], esi
jne 0x100224d
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
push 0x1001210
lea eax, [ebp - 0x208]
push eax
call edi
test eax, eax
je 0x100224d
push 0x1001204
lea eax, [ebp - 0x208]
push eax
call edi
test eax, eax
je 0x100224d
push esi
push esi
push esi
push dword [ebp - 0xc3c]
jmp 0x10022db
push esi
push esi
push esi
push dword [ebp - 0xc3c]
jmp 0x10022ed
push eax
push 0x10011f4
lea eax, [ebp - 0xc1c]
push 0x400
push eax
call sub.msvcrt.dll_swprintf_s
add esp, 0x10
push esi
push esi
lea eax, [ebp - 0xc1c]
push eax
push dword [ebp - 0xc3c]
jmp 0x100232e
push 0x100
lea eax, [ebp - 0x208]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push dword [ebp - 0xc20]
call sub.msvcrt.dll__wsplitpath_s
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
add esp, 0x24
push 0x1001210
lea eax, [ebp - 0x208]
push eax
call edi
test eax, eax
je 0x10022e5
push 0x1001204
lea eax, [ebp - 0x208]
push eax
call edi
test eax, eax
je 0x10022e5
push esi
push esi
push esi
push 0x100119c
push dword [ebp - 0xc20]
push 8
jmp 0x10022f5
push esi
push esi
push esi
push 0x100119c
push dword [ebp - 0xc20]
push 9
call fcn.01001726
mov dword [ebp - 0xc30], 4
jmp 0x1002378
push eax
push 0x10011f4
lea eax, [ebp - 0xc1c]
push 0x400
push eax
call sub.msvcrt.dll_swprintf_s
add esp, 0x10
push esi
push esi
lea eax, [ebp - 0xc1c]
push eax
push 0x100119c
push dword [ebp - 0xc20]
push 0xa
call fcn.01001726
mov dword [ebp - 0xc30], 5
jmp 0x1002378
cmp dword [ebp - 0xc40], esi
je 0x1002364
push 0x100119c
lea eax, [ebp - 0x210]
push ebx
push eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
push dword [ebp - 0xc20]
lea eax, [ebp - 0x210]
push eax
push 0xb
call fcn.01001841
push dword [ebp - 0xc34]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
inc dword [ebp - 0xc28]
jmp 0x1001f96
push esi
push dword [ebp - 0xc60]
jmp 0x1001ec2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xc1
jne 0x10023ce
push dword [ebp - 0xc20]
call fcn.01001430
cmp eax, 0xffffffff
je 0x10023c0
mov dword [ebp - 0xc30], eax
jmp 0x100240e
push esi
push esi
push esi
push esi
push dword [ebp - 0xc20]
push 0xd
jmp 0x10023ff
push esi
push 0x400
lea ecx, [ebp - 0xc1c]
push ecx
push esi
push eax
push esi
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x1002404
push esi
push esi
push esi
lea eax, [ebp - 0xc1c]
push eax
push dword [ebp - 0xc20]
push 7
call fcn.01001726
mov dword [ebp - 0xc30], 3
call dword [sym.imp.ole32.dll_OleUninitialize]
mov eax, dword [ebp - 0xc30]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01002755
leave
ret 0x10