Function at 0x4165be
Capabilities:
Accept command line arguments

Disassembly:
push 0x60
mov eax, 0x60f04c
call fcn.00429868
mov eax, dword [ebp + 8]
mov dword [ebp - 0x54], eax
xor eax, eax
mov ebx, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], 7
mov word [ebp - 0x30], ax
mov dword [ebp - 4], 1
call fcn.004bdebb
mov edi, eax
mov ecx, dword [edi]
mov esi, dword [ecx + 0x1a8]
mov ecx, esi
call dword [0x6317ac]
mov ecx, edi
call esi
mov esi, 0x68305c
test al, al
je 0x416664
push str.PERM
lea ecx, [ebp - 0x50]
call fcn.0040ad69
push 2
pop ebx
lea eax, [ebp - 0x50]
mov byte [ebp - 4], bl
push eax
push esi
lea eax, [ebp - 0x6c]
push eax
call fcn.00416ba9
mov byte [ebp - 4], 3
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x416646
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x30]
call fcn.00411d08
lea ecx, [ebp - 0x6c]
call fcn.00413b5a
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 1
call fcn.00413b5a
mov ecx, dword [0x6c2c54]
call fcn.004d1841
test al, al
je 0x4166c2
push 0x682d00
lea ecx, [ebp - 0x50]
call fcn.0040ad69
or ebx, 4
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 4
push eax
push esi
lea eax, [ebp - 0x6c]
push eax
call fcn.00416ba9
mov byte [ebp - 4], 5
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x4166a4
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x30]
call fcn.00411d08
lea ecx, [ebp - 0x6c]
call fcn.00413b5a
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 1
call fcn.00413b5a
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
and dword [ebp - 0x18], 0
lea ecx, [ebp - 0x18]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov edi, eax
test edi, edi
je 0x41671f
mov ecx, dword [0x6c2c20]
push str._firstsetup
mov ecx, dword [ecx]
mov esi, dword [ecx + 0x18]
lea ecx, [ebp - 0x50]
call fcn.0040ad69
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 6
push eax
push dword [ebp - 0x18]
or ebx, 1
mov ecx, esi
push edi
mov dword [ebp - 0x34], ebx
call dword [0x6317ac]
mov ecx, dword [0x6c2c20]
call esi
test al, al
je 0x41671f
mov byte [ebp - 0x14], 1
mov dword [ebp - 4], 1
test bl, 1
je 0x416733
lea ecx, [ebp - 0x50]
call fcn.00413b5a
cmp byte [ebp - 0x14], 0
je 0x416789
push str.BTSP
lea ecx, [ebp - 0x50]
call fcn.0040ad69
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 7
push eax
push 0x68305c
lea eax, [ebp - 0x6c]
push eax
call fcn.00416ba9
mov byte [ebp - 4], 8
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x41676b
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x30]
call fcn.00411d08
lea ecx, [ebp - 0x6c]
call fcn.00413b5a
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 1
call fcn.00413b5a
cmp dword [ebp - 0x20], 0
jne 0x41679c
push 0x68305c
lea ecx, [ebp - 0x30]
call fcn.00411bb5
push 0x682e10
lea ecx, [ebp - 0x50]
call fcn.0040ad69
mov ecx, dword [ebp - 0x54]
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 9
push eax
call fcn.00411fff
mov ecx, dword [eax]
lea eax, [ebp - 0x30]
add ecx, 0x28
cmp ecx, eax
je 0x4167da
cmp dword [ebp - 0x1c], 8
push dword [ebp - 0x20]
cmovae eax, dword [ebp - 0x30]
push eax
call fcn.00411bde
lea ecx, [ebp - 0x50]
call fcn.00413b5a
mov eax, dword [ebp - 0x1c]
cmp eax, 8
jb 0x41681d
mov ecx, dword [ebp - 0x30]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x34], ecx
cmp eax, 0x1000
jb 0x416814
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.00413cba
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x34]
push eax
push ecx
call fcn.00429588
pop ecx
pop ecx
call fcn.00429817
ret 4