Function at 0x40dfb0
Capabilities:
Accept command line arguments

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov ebp, ecx
xor ebx, ebx
push edi
push ebx
mov dword [esp + 0x1c], ebp
mov dword [ebp + 0x108], 1
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jge 0x40dfe4
pop edi
mov dword [ebp + 0x108], ebx
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 8]
mov dword [0x5fd1c8], 0x5e2050
push eax
push 0x5fd1f0
push 0x5fd158
mov dword [0x5fd028], 0x5fd158
mov dword [0x5fd158], 0x84
mov dword [0x5fd1bc], 0x300
call fcn.0040e220
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [0x5fd1dc], eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov cx, word [0x5e25c0]
mov dl, byte [0x5e25c2]
mov word [esp + 0x10], cx
lea ecx, [esp + 0x10]
push ecx
push eax
mov ecx, 0x5fd158
mov byte [esp + 0x1a], dl
call fcn.0040df60
mov esi, eax
cmp esi, ebx
je 0x40e095
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push str.UnregServer
push esi
call edi
test eax, eax
je 0x40e0d7
push str.RegServer
push esi
call edi
test eax, eax
je 0x40e0f8
lea edx, [esp + 0x10]
mov ecx, 0x5fd158
push edx
push esi
call fcn.0040df60
mov esi, eax
cmp esi, ebx
jne 0x40e067
mov edx, 0x5fd158
test edx, edx
je 0x40e1f8
mov esi, dword [0x5fd168]
xor edi, edi
cmp dword [esi], ebx
je 0x40e20e
mov ebp, dword [sym.imp.ole32.dll_CoRegisterClassObject]
lea ebx, [esi + 0x14]
test edi, edi
jne 0x40e1f0
mov eax, dword [esi + 8]
mov dword [esp + 0x14], edi
test eax, eax
jne 0x40e199
jmp 0x40e1ce
push ebx
push ebx
push ebx
push 0x66
push 0x5fd158
call fcn.0040e540
push ebx
push 1
push 0x5fd158
call fcn.0040e4b0
jmp 0x40e179
push ebx
push ebx
push 1
push 0x66
push 0x5fd158
call fcn.0040e540
mov eax, 0x5fd158
test eax, eax
je 0x40e179
mov esi, dword [0x5fd168]
xor edi, edi
cmp dword [esi], ebx
je 0x40e16e
mov eax, dword [esi + 0x18]
cmp eax, ebx
je 0x40e12a
call eax
test eax, eax
jne 0x40e155
push 1
call dword [esi + 4]
mov edi, eax
cmp edi, ebx
jl 0x40e179
cmp dword [0x5fd158], 0x84
jne 0x40e155
push 1
call dword [esi + 0x1c]
mov ecx, dword [esi]
push eax
push ecx
call fcn.0040e380
mov edi, eax
cmp edi, ebx
jl 0x40e179
cmp dword [0x5fd158], 0x64
jne 0x40e163
add esi, 0x1c
jmp 0x40e166
add esi, 0x24
cmp dword [esi], ebx
jne 0x40e11d
cmp edi, ebx
jl 0x40e179
push ebx
push 0x5fd158
call fcn.0040e930
push 0x5fd158
mov dword [ebp + 0x108], ebx
call fcn.0040e2b0
call dword [sym.imp.ole32.dll_CoUninitialize]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
mov edx, dword [esi + 0xc]
lea ecx, [esp + 0x14]
push ecx
push 0x5ad1f8
push edx
call eax
mov edi, eax
test edi, edi
jl 0x40e1c0
mov eax, dword [esp + 0x14]
mov ecx, dword [esi]
push ebx
push 1
push 4
push eax
push ecx
call ebp
mov edi, eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40e1ce
mov edx, dword [eax]
push eax
call dword [edx + 8]
cmp dword [0x5fd158], 0x64
jne 0x40e1df
add esi, 0x1c
add ebx, 0x1c
jmp 0x40e1e5
add esi, 0x24
add ebx, 0x24
cmp dword [esi], 0
jne 0x40e0bb
test edi, edi
jge 0x40e20e
mov ebp, dword [esp + 0x18]
xor ebx, ebx
mov dword [ebp + 0x108], ebx
call dword [sym.imp.ole32.dll_CoUninitialize]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xc
ret