Function at 0x1004076
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x434
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 8], ebx
call dword [0x1001094]
push ebx
mov dword [ebp - 0xc], eax
call dword [0x10011a4]
push dword [ebp + 8]
mov eax, 0x1008b08
mov dword [0x1008b78], 0x1007098
mov dword [0x1008a00], eax
push 0x10070b0
push eax
mov dword [0x1008b08], 0x84
mov dword [0x1008b6c], 0x300
call fcn.01004433
call dword [0x1001090]
mov dword [0x1008b9c], eax
mov esi, 0x1007290
lea edi, [ebp - 0x18]
lea eax, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
push eax
push dword [ebp - 0xc]
movsw word es:[edi], word [esi]
call fcn.01004a2d
mov esi, eax
cmp esi, ebx
je 0x100412b
mov edi, dword [sym.imp.UNIANSI.dll_lstrcmpiW]
push str.UnregServer
push esi
call edi
test eax, eax
je 0x1004203
push str.RegServer
push esi
call edi
test eax, eax
je 0x1004384
lea eax, [ebp - 0x18]
push eax
push esi
call fcn.01004a2d
mov esi, eax
cmp esi, ebx
jne 0x10040fb
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 8
push eax
mov dword [ebp - 0xc], 0x249
call dword [0x1001008]
push 0x20
push ebx
push 0x1008ba8
call fcn.01006306
mov esi, 0x100
push esi
push ebx
push 0x1008a08
call fcn.01006306
push esi
push ebx
push 0x1008d48
call fcn.01006306
push esi
push ebx
push 0x1008e48
call fcn.01006306
push esi
push ebx
push 0x1008c48
call fcn.01006306
push 0x80
push ebx
push 0x1008bc8
call fcn.01006306
mov esi, 0x1008b08
add esp, 0x48
mov ecx, esi
call fcn.01003fec
push ebx
push 4
push esi
call fcn.010044b6
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.UNIANSI.dll_CreateEventW]
mov edi, dword [sym.imp.UNIANSI.dll_PeekMessageW]
mov dword [0x1008f64], eax
mov byte [ebp - 1], 1
mov byte [ebp + 0xb], bl
push 1
push ebx
push ebx
lea eax, [ebp - 0x34]
push ebx
push eax
call edi
test eax, eax
je 0x10043d9
cmp dword [ebp - 0x30], 0x12
je 0x10043d6
mov eax, dword [0x1008f50]
mov byte [ebp + 0xb], 1
cmp eax, ebx
je 0x10043a2
mov ecx, dword [eax]
lea edx, [ebp - 0x34]
push edx
push eax
call dword [ecx + 0x18]
jmp 0x10041c9
push ebx
push ebx
mov esi, 0x1008b08
push 0x64
push esi
call fcn.01002e98
push ebx
push 1
push esi
call fcn.01004790
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x1004278
mov esi, dword [sym.imp.UNIANSI.dll_LoadStringW]
mov edi, 0x200
lea eax, [ebp - 0x234]
push edi
push eax
push 1
push ebx
call esi
push dword [ebp - 8]
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x434]
push eax
call dword [sym.imp.UNIANSI.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x234]
push edi
push eax
push 2
push ebx
call esi
lea eax, [ebp - 0x234]
push 0x30
push eax
lea eax, [ebp - 0x434]
push eax
push ebx
call dword [0x1001184]
mov eax, dword [0x1008f54]
cmp eax, ebx
je 0x1004298
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
mov eax, dword [0x1008f54]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov dword [0x1008f54], ebx
mov ecx, dword [0x1008f48]
cmp ecx, ebx
je 0x10042a7
call fcn.01004eb4
mov eax, dword [0x1008f4c]
cmp eax, ebx
je 0x10042c8
mov ecx, dword [eax]
push ebx
push eax
call dword [ecx + 0x28]
mov eax, dword [0x1008f4c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov dword [0x1008f4c], ebx
mov eax, dword [0x1008f64]
cmp eax, ebx
je 0x10042de
push eax
call dword [fcn.01001080]
mov dword [0x1008f64], ebx
mov eax, dword [0x1008f50]
cmp eax, ebx
je 0x1004325
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [0x1008f50]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x5c]
test eax, eax
je 0x100431a
mov eax, dword [0x1008f50]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x5c]
push eax
call dword [0x1001010]
mov eax, dword [0x1008f50]
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x58]
mov eax, dword [0x1008f50]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
xor edi, edi
cmp dword [0x1008f60], ebx
jle 0x100434f
mov esi, 0x1008bc8
mov eax, dword [esi]
cmp eax, ebx
je 0x1004343
push eax
call dword [0x100105c]
mov dword [esi], ebx
inc edi
add esi, 4
cmp edi, dword [0x1008f60]
jl 0x1004334
mov eax, dword [0x1008f48]
mov dword [0x1008f60], ebx
cmp eax, ebx
je 0x100436a
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [0x1008f48], ebx
push 0x1008b08
call fcn.01004587
call dword [0x10011b0]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0x10
push ebx
push 1
mov esi, 0x1008b08
push 0x64
push esi
call fcn.01002e98
push ebx
push 1
push esi
call fcn.01004637
jmp 0x100421b
mov eax, dword [0x1008f54]
cmp eax, ebx
je 0x10043bd
mov ecx, dword [eax]
lea edx, [ebp - 0x34]
push edx
push eax
call dword [ecx + 0x18]
test eax, eax
jne 0x10041c9
lea eax, [ebp - 0x34]
push eax
call dword [0x1001188]
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.UNIANSI.dll_DispatchMessageW]
jmp 0x10041c9
mov byte [ebp - 1], bl
mov eax, dword [0x1008f4c]
cmp eax, ebx
je 0x10043f5
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0x34]
cmp eax, 0x88000005
je 0x10043f5
mov byte [ebp + 0xb], 1
cmp byte [ebp + 0xb], bl
jne 0x10041c6
cmp byte [ebp - 1], bl
je 0x100441d
push 0xff
push 0xffffffffffffffff
push ebx
push 0x1008f64
push 1
call dword [0x1001180]
jmp 0x10041c6
push esi
call fcn.0100454b
push 0x3e8
call dword [0x100108c]
jmp 0x1004278