Function at 0x1005226e
Capabilities:
Accept command line arguments

Disassembly:
push 0xc5c
mov eax, 0x100d07d5
call fcn.10002415
mov esi, 0x10103904
push esi
mov dword [ebp - 0xc5c], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp byte [0x1013a144], bl
jne 0x10052629
push ebx
push ebx
push 4
lea ecx, [ebp - 0x430]
call fcn.1004b4e0
push 0x20019
lea ecx, [ebp - 0x430]
mov byte [ebp - 4], 1
call fcn.10006c94
push eax
lea ecx, [ebp - 0x430]
call fcn.10006d6b
test eax, eax
jne 0x10052614
mov dword [ebp - 0x414], ebx
push ebx
push 0x1005263c
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0x430]
mov byte [ebp - 4], 2
call fcn.1004b8ce
test eax, eax
jne 0x10052313
push 0xa
push dword [ebp - 0x414]
call fcn.1003fd9d
test eax, eax
setg byte [0x10104c54]
push ebx
push 0x10052658
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0x430]
call fcn.1004b8ce
test eax, eax
jne 0x10052345
push 0xa
push dword [ebp - 0x414]
call fcn.1003fd9d
test eax, eax
setg byte [0x10104c55]
push ebx
push 0x1005266c
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0x430]
call fcn.1004b8ce
test eax, eax
jne 0x10052377
push 0xa
push dword [ebp - 0x414]
call fcn.1003fd9d
test eax, eax
setg byte [0x10104c56]
lea eax, [ebp - 0x830]
mov dword [ebp - 0x840], eax
xor eax, eax
lea edi, [ebp - 0x830]
mov dword [ebp - 0x83c], 0x200
mov byte [ebp - 0x838], bl
mov dword [ebp - 0x834], ebx
mov word [ebp - 0x830], ax
stosd dword es:[edi], eax
mov word [ebp - 0x82c], ax
push ebx
push 0x10052694
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0x430]
mov byte [ebp - 4], 3
call fcn.1004b8ce
test eax, eax
jne 0x10052416
lea eax, [ebp - 0xc58]
push eax
call fcn.10052121
mov eax, dword [eax]
mov dword [ebp - 0xc54], eax
push eax
lea ecx, [ebp - 0x840]
mov byte [ebp - 4], 4
call fcn.10046bba
lea ecx, [ebp - 0xc54]
mov byte [ebp - 4], 3
call fcn.10006bef
push dword [ebp - 0x414]
lea ecx, [ebp - 0x840]
call fcn.100467f9
jmp 0x10052443
push ebx
push 0x100526b0
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0x430]
call fcn.1004b8ce
test eax, eax
jne 0x10052443
push dword [ebp - 0x414]
lea ecx, [ebp - 0x840]
call fcn.10046bba
mov eax, dword [ebp - 0x840]
xor ecx, ecx
cmp cx, word [eax]
je 0x100525f7
push eax
mov byte [ebp - 0x838], 1
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
and dword [ebp - 0xc44], 0
mov ebx, eax
lea eax, [ebp - 0xc40]
mov dword [ebp - 0xc50], eax
xor eax, eax
lea edi, [ebp - 0xc40]
mov dword [ebp - 0xc4c], 0x200
mov word [ebp - 0xc40], ax
stosd dword es:[edi], eax
mov word [ebp - 0xc3c], ax
push dword [ebp - 0xc4c]
mov byte [ebp - 4], 5
push dword [ebp - 0xc50]
mov byte [ebp - 0xc48], 1
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x100524f0
push 0x80004005
push 0x66673573
lea eax, [ebp - 0xc68]
push eax
call fcn.10042c59
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.100420b4
lea ecx, [ebp - 0xc68]
mov byte [ebp - 4], 5
call fcn.10041a51
push dword [ebp - 0xc50]
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea ecx, [ebp - 0x840]
mov esi, eax
call fcn.10046f42
mov edi, dword [ebp - 0x840]
push ebx
push esi
call fcn.10008710
push eax
push edi
lea eax, [ebp - 0x840]
push 0x100526c4
push eax
call fcn.100469f0
add esp, 0x14
xor ebx, ebx
push ebx
push 0x80
push 0x7021
push dword [ebp - 0x840]
mov ecx, 0x10105c68
call fcn.1004f099
test al, al
je 0x100525de
mov byte [0x1013a145], 1
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, eax
test edi, edi
je 0x10052573
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x10052577
mov esi, ebx
jmp 0x1005258e
lea esi, [eax + eax]
mov eax, esi
call fcn.10010923
mov eax, esp
push ebx
push esi
push edi
push eax
call fcn.1004a5a6
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push esi
push 0x100526e4
push 0x3ff
lea eax, [ebp - 0x410]
push 0x400
push eax
call dword [sym.imp.MSVCR100.dll__snprintf_s]
mov edx, dword [0x10105c68]
add esp, 0x18
push 2
push ebx
push ebx
mov ecx, 0x10105c68
mov esi, eax
call dword [edx + 8]
push esi
lea eax, [ebp - 0x410]
push eax
push dword [0x10105c70]
call fcn.1004e025
jmp 0x100525e4
mov byte [0x1013a145], bl
lea eax, [ebp - 0xc50]
push eax
mov ecx, eax
call fcn.10008645
mov esi, 0x10103904
lea eax, [ebp - 0x840]
push eax
mov ecx, eax
call fcn.10008645
lea ecx, [ebp - 0x414]
mov byte [ebp - 4], 1
call fcn.10006bef
lea ecx, [ebp - 0x430]
mov byte [0x1013a144], 1
mov byte [ebp - 4], bl
call fcn.10008662
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esp, [ebp - 0xc78]
call fcn.10002556
ret