Function at 0x401856
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x584
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
xor ebx, ebx
mov dword [ebp + 0x10], eax
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x34]
mov dword [ebp - 0xc], ebx
mov byte [ebp - 0x34], al
call fcn.004039b5
mov esi, 0x423448
push esi
call fcn.0040f380
pop ecx
push eax
push esi
lea ecx, [ebp - 0x34]
call fcn.00403b7b
push dword [ebp + 8]
mov esi, 0x423460
mov dword [0x4234d0], 0x41e0c8
mov dword [0x423444], esi
push 0x4234f0
push esi
mov dword [0x423460], 0x84
mov dword [0x4234c4], 0x300
call fcn.00403127
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, 0x41e148
mov dword [0x4234e4], eax
push edi
mov dword [ebp - 0x10], ebx
push dword [ebp + 0x10]
mov dword [ebp - 4], 1
call fcn.004015c5
pop ecx
cmp eax, ebx
pop ecx
mov dword [ebp + 0x10], eax
je 0x401998
push str.UnregServer
push eax
call fcn.0040f816
pop ecx
test eax, eax
pop ecx
je 0x401940
push str.RegServer
push dword [ebp + 0x10]
call fcn.0040f816
pop ecx
test eax, eax
pop ecx
je 0x401954
push str.DeviceName
push dword [ebp + 0x10]
call fcn.0040f7a0
pop ecx
test eax, eax
pop ecx
jne 0x401970
push edi
push dword [ebp + 0x10]
jmp 0x4018f1
push ebx
push ebx
push 0x64
push esi
call fcn.00401db9
push ebx
push ebx
push esi
call fcn.004033f4
jmp 0x401968
push ebx
push 1
push 0x64
push esi
call fcn.00401db9
push ebx
push 1
push esi
call fcn.0040327b
mov dword [ebp - 0x10], eax
jmp 0x401a47
push 0x41e120
push dword [ebp + 0x10]
call fcn.004015c5
mov edi, eax
pop ecx
cmp edi, ebx
pop ecx
je 0x401998
push edi
call fcn.0040f380
pop ecx
push eax
push edi
mov ecx, 0x423450
call fcn.00403b7b
call fcn.0040d2f8
cmp al, 1
jne 0x4019c7
lea eax, [ebp + 0x13]
mov byte [ebp + 0x13], bl
push eax
call fcn.0040d4ed
cmp al, 1
pop ecx
jne 0x401a47
test byte [ebp + 0x13], 0xe
jne 0x401a47
mov dword [ebp - 4], 1
mov edi, str.igfxtraymutext
push edi
call fcn.0040f380
pop ecx
push eax
push edi
lea ecx, [ebp - 0x34]
call fcn.00403b7b
mov eax, dword [ebp - 0x30]
cmp eax, ebx
jne 0x4019e9
mov eax, 0x41a648
push 0x104
push eax
lea eax, [ebp - 0x184]
push eax
call fcn.0040f706
lea eax, [ebp - 0x184]
push eax
call fcn.0040ca10
mov edi, eax
push edi
call fcn.0040f380
add esp, 0x14
lea ecx, [ebp - 0x34]
push eax
push edi
call fcn.00403b7b
mov eax, dword [ebp - 0x30]
cmp eax, ebx
jne 0x401a28
mov eax, 0x41a648
push eax
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0xc], ebx
je 0x401a47
cmp eax, 0xb7
jne 0x401a4a
mov dword [ebp - 4], ebx
push str.Uninited
push 0x423450
call fcn.00404169
pop ecx
test al, al
pop ecx
je 0x401cc8
cmp dword [ebp - 4], ebx
je 0x401d91
push 0x114
call fcn.0040edb3
cmp eax, ebx
pop ecx
je 0x401a89
mov ecx, eax
call fcn.0040ace8
mov edi, eax
mov dword [ebp - 8], edi
jmp 0x401a8e
mov dword [ebp - 8], ebx
mov edi, ebx
mov eax, dword [edi + 0x10c]
push 1
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, ecx
jle 0x401c80
mov al, byte [ebp + 0xb]
mov dword [ebp + 0x10], ecx
push ebx
lea ecx, [ebp - 0x48]
mov byte [ebp - 0x48], al
call fcn.004039b5
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x20]
mov byte [ebp - 0x20], al
call fcn.004039b5
cmp dword [ebp - 0x24], 1
jle 0x401c4a
push dword [ebp + 0x10]
mov ecx, edi
call fcn.00403795
push eax
call fcn.0040f380
test eax, eax
pop ecx
jbe 0x401b01
push dword [ebp + 0x10]
mov ecx, edi
call fcn.00403795
mov edi, eax
push edi
call fcn.0040f380
pop ecx
push eax
push edi
mov ecx, 0x423450
call fcn.00403b7b
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, eax
push edi
call fcn.0040f380
pop ecx
push eax
push edi
lea ecx, [ebp - 0x20]
call fcn.00403b7b
mov edi, 0x41e10c
push edi
call fcn.0040f380
pop ecx
push eax
push ebx
push edi
lea ecx, [ebp - 0x20]
call fcn.00403907
cmp eax, dword [0x41a650]
je 0x401b74
push edi
call fcn.0040f380
pop ecx
push eax
push ebx
push edi
lea ecx, [ebp - 0x20]
call fcn.00403907
cmp dword [ebp - 0x18], eax
mov dword [ebp - 0x38], eax
jb 0x401b6a
cmp dword [ebp - 0x1c], ebx
je 0x401b6a
lea ecx, [ebp - 0x20]
call fcn.00403989
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x38]
add eax, ecx
jmp 0x401b6f
mov eax, 0x41a648
mov byte [eax], 0x20
jmp 0x401b1f
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
jne 0x401b80
mov eax, 0x41a648
push eax
lea eax, [ebp - 0x584]
push eax
call fcn.0040f290
lea eax, [ebp - 0x584]
push eax
call fcn.0040c979
mov edi, eax
push edi
call fcn.0040f380
add esp, 0x10
lea ecx, [ebp - 0x20]
push eax
push edi
call fcn.00403b7b
push dword [0x41a650]
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x48]
push ebx
push eax
call fcn.00403839
mov edi, 0x41e108
push edi
call fcn.0040f380
pop ecx
push eax
push edi
lea ecx, [ebp - 0x48]
call fcn.00403b24
mov edi, str.DeviceName
push edi
call fcn.0040f380
pop ecx
push eax
push edi
lea ecx, [ebp - 0x48]
call fcn.00403b24
mov edi, 0x41e120
push edi
call fcn.0040f380
pop ecx
push eax
push edi
lea ecx, [ebp - 0x48]
call fcn.00403b24
push dword [0x41a650]
lea ecx, [ebp - 0x48]
push ebx
push 0x423450
call fcn.00403a9c
mov ecx, dword [ebp - 0x44]
cmp ecx, ebx
jne 0x401c23
mov ecx, 0x41a648
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
jne 0x401c2f
mov eax, 0x41a648
push ecx
push eax
call fcn.0040c616
inc dword [ebp + 0x10]
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp - 0x24]
mov edi, dword [ebp - 8]
pop ecx
pop ecx
jl 0x401acd
push ebx
mov ecx, edi
call fcn.00403795
push eax
mov dword [ebp + 0x10], eax
call fcn.0040f380
pop ecx
push eax
mov ecx, 0x423450
push dword [ebp + 0x10]
call fcn.00403b7b
push 1
lea ecx, [ebp - 0x20]
call fcn.004039b5
push 1
lea ecx, [ebp - 0x48]
call fcn.004039b5
jmp 0x401cbc
cmp eax, ebx
jle 0x401cb9
push ebx
mov ecx, edi
call fcn.00403795
push eax
call fcn.0040f380
test eax, eax
pop ecx
jbe 0x401cb9
push ebx
mov ecx, edi
call fcn.00403795
push eax
mov dword [ebp + 0x10], eax
call fcn.0040f380
pop ecx
push eax
mov ecx, 0x423450
push dword [ebp + 0x10]
call fcn.00403b7b
jmp 0x401cbc
mov dword [ebp - 4], ebx
cmp edi, ebx
je 0x401cc8
mov eax, dword [edi]
push 1
mov ecx, edi
call dword [eax]
cmp dword [ebp - 4], ebx
je 0x401d91
push 1
push 4
push esi
call fcn.004031aa
push 0x28
lea eax, [ebp - 0x7c]
push ebx
push eax
call fcn.0040f5d0
mov eax, dword [ebp + 8]
add esp, 0xc
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x7c]
push eax
mov dword [ebp - 0x78], 0x4015fd
mov dword [ebp - 0x58], str.igfxtrayClass
call dword [sym.imp.USER32.dll_RegisterClassA]
mov edi, str.igfxtrayWindow
push edi
call fcn.0040f380
pop ecx
push eax
push edi
lea ecx, [ebp - 0x34]
call fcn.00403b7b
push dword [0x41a650]
lea ecx, [ebp - 0x34]
push ebx
push 0x423450
call fcn.00403a9c
mov eax, dword [ebp - 0x30]
cmp eax, ebx
jne 0x401d3e
mov eax, 0x41a648
push ebx
push dword [ebp + 8]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
push str.igfxtrayClass
push ebx
call dword [sym.imp.USER32.dll_CreateWindowExA]
push ebx
push ebx
push dword [0x42353c]
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
push ebx
push ebx
lea eax, [ebp - 0x54]
push ebx
push eax
call edi
test eax, eax
je 0x401d8b
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push ebx
push ebx
lea eax, [ebp - 0x54]
push ebx
push eax
jmp 0x401d72
push esi
call fcn.0040323f
cmp dword [ebp - 0xc], ebx
pop edi
pop esi
pop ebx
je 0x401da2
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.ole32.dll_CoUninitialize]
push 1
lea ecx, [ebp - 0x34]
call fcn.004039b5
mov eax, dword [ebp - 0x10]
leave
ret 0x10