Function at 0x1036986
Capabilities:
Accept command line arguments
Check mutex and terminate process on windows
Check mutex on windows
Print debug messages
Register raw input devices
Set current directory
Terminate process

Disassembly:
push 0x690
mov eax, 0x108737b
call fcn.01034bf1
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
xor edi, edi
push edi
push edi
push edi
mov dword [ebp - 0x630], esi
mov dword [ebp - 0x62c], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.01056f49
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x10]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, di
jne 0x10369c2
sub eax, ecx
sar eax, 1
lea ebx, [eax + 0x18]
xor ecx, ecx
push 2
pop edx
mov eax, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.010347af
pop ecx
mov dword [ebp - 0x620], eax
cmp eax, edi
jne 0x10369fe
xor al, al
call fcn.01034c45
ret 8
push 0x100a6b0
push ebx
push eax
call sub.msvcrt.dll_wcscpy_s
mov eax, dword [esi]
add esp, 0xc
mov ecx, esi
call dword [eax + 0x10]
push eax
push ebx
push dword [ebp - 0x620]
call sub.msvcrt.dll_wcscat_s
push 0x100a698
push ebx
push dword [ebp - 0x620]
call sub.msvcrt.dll_wcscat_s
add esp, 0x18
push dword [ebp - 0x620]
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
push dword [ebp - 0x620]
mov ebx, eax
call fcn.0103479e
pop ecx
cmp ebx, edi
jne 0x1036a5d
push edi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1036ab3
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x10]
push eax
call fcn.0105ae43
pop ecx
mov esi, eax
push edi
push esi
call dword [sym.imp.USER32.dll_FindWindowW]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp ebx, edi
je 0x1036a56
push ebx
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
je 0x1036aa3
push 0xa
push ebx
call dword [sym.imp.USER32.dll_ShowWindow]
push ebx
call dword [sym.imp.USER32.dll_BringWindowToTop]
push ebx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x1036a56
mov ebx, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
call ebx
lea ecx, [ebp - 0x634]
push ecx
push eax
mov dword [ebp - 0x634], edi
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
xor ecx, ecx
inc ecx
cmp dword [ebp - 0x634], ecx
mov dword [ebp - 0x624], eax
mov dword [ebp - 0x628], ecx
jle 0x1036b3f
mov edx, dword [ebp - 0x624]
mov ecx, dword [edx + ecx*4]
mov eax, 0x100a68c
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x1036b1a
cmp dx, di
je 0x1036b16
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x1036b1a
add ecx, 4
add eax, 4
cmp dx, di
jne 0x1036af4
xor eax, eax
jmp 0x1036b1f
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
jne 0x1036b2a
mov byte [0x109750b], 1
mov ecx, dword [ebp - 0x628]
inc ecx
cmp ecx, dword [ebp - 0x634]
mov dword [ebp - 0x628], ecx
jl 0x1036ae6
push edi
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_RegisterApplicationRestart]
push edi
call dword [sym.imp.ole32.dll_CoInitialize]
mov byte [ebp - 0x619], 0
mov dword [ebp - 0x620], edi
lea eax, [ebp - 0x620]
push eax
push 0x1009e64
push 1
push edi
push 0x100a67c
mov dword [ebp - 4], edi
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, edi
jl 0x1036c05
mov ebx, 0x104
push ebx
lea eax, [ebp - 0x618]
push eax
push edi
push edi
push 0x1009d68
call sub.SHELL32.dll_SHGetFolderPathEx
cmp eax, edi
jl 0x1036c05
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x54]
push eax
push ebx
lea eax, [ebp - 0x618]
push eax
call fcn.01036607
cmp eax, edi
jl 0x1036c05
lea eax, [ebp - 0x618]
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [0x109742c], eax
cmp eax, edi
je 0x1036c05
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
je 0x1036c05
mov eax, dword [ebp - 0x620]
mov ecx, dword [eax]
lea edx, [ebp - 0x624]
push edx
push dword [0x109742c]
push eax
call dword [ecx + 0x18]
cmp eax, edi
jl 0x1036c05
cmp dword [ebp - 0x624], edi
je 0x1036c05
mov byte [ebp - 0x619], 1
mov eax, dword [ebp - 0x620]
or dword [ebp - 4], 0xffffffff
cmp eax, edi
je 0x1036c19
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp byte [ebp - 0x619], 0
jne 0x1036c29
push 5
call fcn.010367df
push 4
call fcn.0103472f
pop ecx
cmp eax, edi
je 0x1036c3e
mov dword [eax], edi
mov dword [0x1097448], eax
jmp 0x1036c44
mov dword [0x1097448], edi
push 0x1035ce0
call dword [sym.imp.msvcrt.dll_int____cdecl___unsigned_int____cdecl__set_new_handler_int____cdecl___unsigned_int__]
push 1
call dword [sym.imp.msvcrt.dll_int___cdecl__set_new_mode_int_]
pop ecx
pop ecx
mov dword [0x1097440], esi
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x10]
push eax
call fcn.0105ae43
mov dword [0x1097428], eax
mov dword [esp], 0x200
lea eax, [ebp - 0x410]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [eax - 1]
jmp 0x1036ca0
movzx edx, word [ebp + ecx*2 - 0x410]
cmp dx, 0x2f
je 0x1036ca6
cmp dx, 0x5c
je 0x1036ca6
dec ecx
cmp ecx, eax
jbe 0x1036c8b
jmp 0x1036cb0
xor eax, eax
mov word [ebp + ecx*2 - 0x410], ax
lea eax, [ebp - 0x410]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x100a668
mov ecx, 0x1097458
call fcn.0105b56c
push 0x10
pop ebx
push ebx
call fcn.0103472f
pop ecx
mov dword [ebp - 0x624], eax
mov dword [ebp - 4], 1
cmp eax, edi
je 0x1036cf0
mov ecx, eax
call fcn.010613c1
jmp 0x1036cf2
xor eax, eax
or dword [ebp - 4], 0xffffffff
push eax
mov dword [0x1098298], eax
call fcn.01054a29
push dword [0x1097428]
call fcn.0104c9fa
push 0x100a638
mov esi, 0x1009e10
push esi
push 0x469
push ebx
call fcn.01054409
add esp, 0x10
call fcn.01045aac
test al, al
jne 0x1036d48
push 0x100a60c
push esi
push 0x46c
push ebx
call fcn.01054409
add esp, 0x10
push edi
jmp 0x1036c24
push dword [0x1097428]
push 0x100a5d0
push esi
push 0x472
push ebx
call fcn.01054409
add esp, 0x14
lea eax, [ebp - 0x410]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [ebp - 0x410]
push eax
push 0x100a598
push esi
push 0x476
push ebx
call fcn.01054409
push 0x100a574
push esi
push 0x47a
push ebx
call fcn.01054409
xor eax, eax
inc eax
add esp, 0x24
mov dword [ebp - 0x674], eax
mov dword [ebp - 0x66c], eax
lea eax, [ebp - 0x664]
push eax
lea eax, [ebp - 0x674]
push eax
push 0x1097424
mov dword [ebp - 0x670], edi
mov dword [ebp - 0x668], edi
call sub.gdiplus.dll_GdiplusStartup
lea eax, [ebp - 0x65c]
push eax
lea eax, [ebp - 0x658]
push eax
mov dword [ebp - 0x658], edi
mov dword [ebp - 0x65c], edi
call fcn.0103d10c
push 0x1440
call fcn.0103472f
pop ecx
mov dword [ebp - 0x624], eax
mov dword [ebp - 4], 2
cmp eax, edi
je 0x1036e13
push edi
mov ecx, eax
call fcn.01053c33
jmp 0x1036e15
xor eax, eax
mov ecx, dword [ebp - 0x630]
or dword [ebp - 4], 0xffffffff
mov dword [0x109744c], eax
mov eax, dword [ecx]
call dword [eax]
push eax
lea ecx, [ebp - 0x640]
call fcn.01055719
movzx eax, byte [0x1098578]
mov ecx, dword [0x109744c]
push 0x100a564
push eax
lea eax, [ebp - 0x640]
push eax
mov dword [ebp - 4], 3
call fcn.01053d59
neg al
sbb al, al
or dword [ebp - 4], 0xffffffff
inc al
lea ecx, [ebp - 0x640]
mov byte [ebp - 0x619], al
call fcn.010558b4
cmp byte [ebp - 0x619], 0
je 0x1036ef1
lea ecx, [ebp - 0x640]
call fcn.010556b2
push 0x37c
lea ecx, [ebp - 0x69c]
mov dword [ebp - 4], 4
call fcn.010557e2
mov ecx, dword [ebp - 0x630]
mov esi, dword [eax + 8]
mov eax, dword [ecx]
mov byte [ebp - 4], 5
call dword [eax]
push eax
lea eax, [ebp - 0x640]
push esi
push eax
call fcn.01055ade
add esp, 0xc
lea ecx, [ebp - 0x69c]
mov byte [ebp - 4], 4
call fcn.010558b4
push 1
push dword [ebp - 0x638]
push edi
push 0xfffe
push 1
push edi
push 0x385
call fcn.010571e4
jmp 0x1036d42
call fcn.0103fbdf
test al, al
jne 0x1036f0a
push 0x100a534
push esi
push 0x4ae
jmp 0x1036d39
cmp byte [0x109750b], 0
je 0x1036fa3
push 0x100a504
push esi
push 0x4bb
push ebx
call fcn.01054409
add esp, 0x10
push edi
call fcn.01058775
cmp byte [0x109750b], 0
je 0x1036fa3
push 0x100a4a8
push esi
push 0x4c4
push ebx
call fcn.01054409
add esp, 0x10
push 0xc
pop eax
mov word [ebp - 0x640], ax
xor eax, eax
inc eax
mov word [ebp - 0x63e], ax
mov eax, dword [0x1097430]
push 0xc
mov dword [ebp - 0x638], eax
push 1
lea eax, [ebp - 0x640]
push eax
mov dword [ebp - 0x63c], edi
call dword [sym.imp.USER32.dll_RegisterRawInputDevices]
test eax, eax
jne 0x1036fa3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x100a46c
push esi
push 0x4cf
push ebx
call fcn.01054409
add esp, 0x14
push 0x100a440
push esi
push 0x4d5
push ebx
call fcn.01054409
add esp, 0x10
push 0x1036004
push 2
call fcn.0104885f
push 0x1036048
push 4
call fcn.0104885f
push 0x103606e
push 5
call fcn.0104885f
push 0x1036026
push 3
call fcn.0104885f
push 0x1036090
push 6
call fcn.0104885f
push 0x10360b2
push 7
call fcn.0104885f
push 0x10360d4
push 8
call fcn.0104885f
push 0x10360fa
push 9
call fcn.0104885f
push 0x1036120
push 0xa
call fcn.0104885f
push 0x1036146
push 0xb
call fcn.0104885f
push 0x1036168
push 1
call fcn.0104885f
push 0x10361b0
push 0xd
call fcn.0104885f
push 0x103618a
push 0xc
call fcn.0104885f
push 0x10361d2
push 0xe
call fcn.0104885f
push 0x10361f4
push 0xf
call fcn.0104885f
push 0x1036216
push ebx
call fcn.0104885f
push 0x1036240
push 0x11
call fcn.0104885f
push 0x1036262
push 0x12
call fcn.0104885f
push 0x1036284
push 0x13
call fcn.0104885f
push 0x10362a6
push 0x14
call fcn.0104885f
push 0x10362c8
push 0x15
call fcn.0104885f
push 0x10362ea
push 0x16
call fcn.0104885f
push 0x1035f9e
push 0x17
call fcn.0104885f
push 0x1035fc0
push 0x18
call fcn.0104885f
push 0x103630c
push 0x19
call fcn.0104885f
push 0x103632e
push 0x1a
call fcn.0104885f
push 0x1036350
push 0x1b
call fcn.0104885f
push 0x1036372
push 0x1c
call fcn.0104885f
push 0x1036394
push 0x1d
call fcn.0104885f
push 0x10363ba
push 0x1e
call fcn.0104885f
push 0x1036406
push 0x1f
call fcn.0104885f
push 0x103642c
push 0x20
call fcn.0104885f
push 0x1036452
push 0x21
call fcn.0104885f
push 0x1036478
push 0x22
call fcn.0104885f
push 0x1035fe2
push 0x25
call fcn.0104885f
push 0x10363e0
push 0x23
call fcn.0104885f
push 0x100a410
push esi
push 0x500
push ebx
call fcn.01054409
add esp, 0x10
call fcn.010486b8
call fcn.010477a7
call fcn.0103bb84
call fcn.01046eba
call fcn.01046444
call fcn.01045e18
call fcn.01045c30
push 0x100a3dc
push esi
push 0x50b
push ebx
call fcn.01054409
add esp, 0x10
call fcn.010457c4
test al, al
jne 0x10371ca
push 0x100a398
push esi
push 0x50e
jmp 0x1036d39
push fcn.01035b98
call fcn.0105707a
push 0x100a35c
push esi
push 0x518
push ebx
call fcn.01054409
push 0x54
call fcn.0103472f
add esp, 0x14
mov dword [ebp - 0x624], eax
mov dword [ebp - 4], 6
cmp eax, edi
je 0x1037209
mov ecx, eax
call fcn.01043cd3
jmp 0x103720b
xor eax, eax
or dword [ebp - 4], 0xffffffff
push eax
mov dword [0x10982d8], eax
call fcn.01054a29
mov ecx, dword [0x10982d8]
call fcn.01043d19
test al, al
jne 0x1037239
push 0x100a310
push esi
push 0x51c
jmp 0x1036d39
mov ecx, dword [0x1097440]
xor eax, eax
lea edi, [ebp - 0x654]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [0x1097434]
lea edx, [ebp - 0x64c]
push edx
lea edx, [ebp - 0x650]
mov dword [ebp - 0x654], eax
mov byte [ebp - 0x644], 0
mov dword [ebp - 0x648], 0x20
mov byte [ebp - 0x643], 0
mov eax, dword [ecx]
push edx
call dword [eax + 0xc]
cmp byte [0x1097420], 0
je 0x10372a7
mov eax, dword [ebp - 0x650]
add eax, eax
mov dword [ebp - 0x650], eax
mov eax, dword [ebp - 0x64c]
add eax, eax
mov dword [ebp - 0x64c], eax
push 0x100a2d8
push esi
push 0x533
push ebx
call fcn.01054409
push 0x90
call fcn.0103472f
add esp, 0x14
mov dword [ebp - 0x624], eax
xor edi, edi
mov dword [ebp - 4], 7
cmp eax, edi
je 0x10372e1
mov ecx, eax
call fcn.01038238
jmp 0x10372e3
xor eax, eax
or dword [ebp - 4], 0xffffffff
push eax
mov dword [0x10974ac], eax
call fcn.01054a29
mov ecx, dword [0x10974ac]
lea eax, [ebp - 0x654]
push eax
call fcn.01039a80
test al, al
jne 0x1037318
push 0x100a290
push esi
push 0x537
jmp 0x1036d39
push 0x100a268
push esi
push 0x53e
push ebx
call fcn.01054409
push 0x28
call fcn.0103472f
add esp, 0x14
mov dword [ebp - 0x624], eax
mov dword [ebp - 4], 8
cmp eax, edi
je 0x103734d
mov ecx, eax
call fcn.0103a054
jmp 0x103734f
xor eax, eax
or dword [ebp - 4], 0xffffffff
push eax
mov dword [0x10974b8], eax
call fcn.01054a29
mov ecx, dword [0x10974b8]
call fcn.01039f13
test al, al
jne 0x103737d
push 0x100a230
push esi
push 0x542
jmp 0x1036d39
push 0x100a1e8
push esi
push 0x54a
push ebx
call fcn.01054409
push 0x80
call fcn.0103472f
add esp, 0x14
mov dword [ebp - 0x624], eax
mov dword [ebp - 4], 9
cmp eax, edi
je 0x10373c9
movzx ecx, byte [0x109750b]
push dword [ebp - 0x62c]
push ecx
push dword [0x1097430]
mov ecx, eax
call fcn.0105caca
jmp 0x10373cb
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov ecx, eax
mov dword [0x1097438], eax
call fcn.0105c932
push 0x100a1bc
push esi
push 0x551
push ebx
call fcn.01054409
push 0x34
call fcn.0103472f
add esp, 0x14
cmp eax, edi
je 0x1037403
mov ecx, eax
call fcn.01036790
jmp 0x1037405
xor eax, eax
push eax
mov dword [0x1098294], eax
call fcn.01054a29
mov ecx, dword [0x1098294]
call fcn.01045aac
test al, al
jne 0x103742f
push 0x100a184
push esi
push 0x555
jmp 0x1036d39
push 0x100a168
push esi
push 0x55c
push ebx
call fcn.01054409
mov ecx, dword [0x1098298]
add esp, 0x10
push 0x100a14c
call fcn.010427ca
cmp eax, edi
je 0x103751b
lea ecx, [ebp - 0x628]
push ecx
push 0x100a140
mov ecx, eax
call fcn.0105c065
push dword [ebp - 0x628]
mov dword [ebp - 0x624], eax
push 0x100a120
push esi
push 0x567
push ebx
call fcn.01054409
add esp, 0x14
mov dword [ebp - 0x620], edi
cmp dword [ebp - 0x628], edi
jbe 0x103750d
mov eax, dword [ebp - 0x624]
mov ecx, dword [ebp - 0x620]
mov ecx, dword [eax + ecx*4]
call fcn.0105b4eb
mov edi, eax
push edi
push 0x100a0fc
push esi
push 0x56c
push ebx
call fcn.01054409
add esp, 0x14
push edi
call dword [sym.imp.GDI32.dll_AddFontResourceW]
push edi
test eax, eax
jne 0x10374ef
push 0x100a0d0
push esi
push 0x584
push ebx
call fcn.01054409
push edi
call fcn.0103479e
add esp, 0x18
jmp 0x10374f9
mov ecx, 0x108e230
call fcn.01053589
inc dword [ebp - 0x620]
mov eax, dword [ebp - 0x620]
cmp eax, dword [ebp - 0x628]
jb 0x103749c
push dword [ebp - 0x624]
call fcn.0103479e
pop ecx
jmp 0x103752f
push 0x100a0ac
push esi
push 0x592
push ebx
call fcn.01054409
add esp, 0x10
push 0x100a060
push esi
push 0x597
push ebx
call fcn.01054409
add esp, 0x10
push 0
push dword [0x1097430]
call sub.WTSAPI32.dll_WTSRegisterSessionNotification
mov ecx, dword [0x1098298]
push 0x100a048
call fcn.010427ca
push 0x1009fd8
push esi
push 0x59f
push ebx
mov dword [ebp - 0x62c], eax
mov byte [0x109743f], 1
call fcn.01054409
mov edi, dword [ebp - 0x630]
mov eax, dword [edi]
add esp, 0x10
mov ecx, edi
call dword [eax + 0x30]
test al, al
jne 0x10375ad
push 0x1009f90
push esi
push 0x5a2
push ebx
call fcn.01054409
add esp, 0x10
push 0
jmp 0x1036c24
mov ecx, dword [ebp - 0x62c]
xor esi, esi
mov byte [0x109743f], 0
cmp ecx, esi
je 0x10375d6
push 0xffffffffffffffff
push 0x1009f68
call fcn.0105b707
test eax, eax
setg al
mov byte [0x109743d], al
call fcn.01036541
mov dword [0x1097444], esi
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x28]
test eax, eax
je 0x1037607
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
mov dword [0x1097444], eax
push 0x1097424
mov byte [0x108e22c], 0
call dword [ebp - 0x664]
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x690]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x103767f
push esi
push esi
push esi
lea eax, [ebp - 0x690]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
je 0x1037686
mov eax, dword [0x1097444]
cmp eax, esi
je 0x1037663
lea ecx, [ebp - 0x690]
push ecx
push eax
push dword [0x1097430]
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x1037619
lea eax, [ebp - 0x690]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x690]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x1037619
call fcn.01035de4
jmp 0x1037619
push dword [0x1097424]
call dword [ebp - 0x660]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x48]
push esi
jmp 0x1036c24