Function at 0x1004080d0
Capabilities:
Accept command line arguments
Read .ini file

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov r15, rcx
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rcx, 0xffffffffffffffff
mov r14, rax
mov rax, qword [r15 + 0x1090]
mov rsi, rcx
nop dword [rax]
inc rsi
cmp word [rax + rsi*2], 0
jne 0x100408110
mov rbx, rcx
nop dword [rax]
inc rbx
cmp word [r14 + rbx*2], 0
jne 0x100408120
mov ebp, 0
mov edi, ebp
sub rbx, 1
je 0x100408160
cmp word [r14 + rbx*2], 0x5c
je 0x100408148
sub rbx, 1
jne 0x100408138
jmp 0x100408160
test rbx, rbx
je 0x100408160
nop dword [rax]
cmp word [r14 + rdi*2], 0x22
jne 0x100408160
inc rdi
cmp rdi, rbx
jb 0x100408150
mov r13, rbx
mov eax, 2
sub r13, rdi
add r13, 2
add r13, rsi
mul r13
cmovo rax, rcx
mov rcx, rax
call fcn.10040fcd8
lea r14, [r14 + rdi*2]
mov r9, rbx
mov r8, r14
mov rdx, r13
mov rcx, rax
mov r12, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov r8, qword [r15 + 0x1090]
mov r9, rsi
mov rdx, r13
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
mov ecx, 0x1000
call fcn.10040fcd8
mov ecx, 0x1000
mov qword [r15 + 0x18], rax
call fcn.10040fcd8
mov r9, rax
mov qword [rsp + 0x28], r12
lea r8, str.TRUE
mov dword [rsp + 0x20], 0x800
lea rdx, str.EnableTracing
mov rsi, rax
lea rcx, str.Logging
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov rdi, rsi
nop dword [rax]
movzx ecx, word [rdi]
test cx, cx
je 0x10040821f
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_towupper]
mov word [rdi], ax
inc ebp
add rdi, 2
cmp ebp, 0x800
jl 0x100408200
xor edi, edi
lea r8, str.FALSE
mov eax, edi
nop word [rax + rax]
movzx ecx, word [rsi + rax*2]
inc rax
cmp cx, word [r8 + rax*2 - 2]
jne 0x10040824b
cmp rax, 6
jne 0x100408230
cmp cx, word [r8 + rax*2 - 2]
mov eax, edi
mov qword [rsp + 0x28], r12
setne al
mov dword [rsp + 0x20], 0x800
mov dword [r15 + 8], eax
lea r8, str.DEFAULT
mov r9, rsi
mov word [rsi], di
lea rdx, str.TraceLevel
lea rcx, str.Logging
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ebp, edi
mov rdi, rsi
movzx ecx, word [rdi]
test cx, cx
je 0x1004082a6
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_towupper]
mov word [rdi], ax
inc ebp
add rdi, 2
cmp ebp, 0x800
jl 0x100408287
xor edi, edi
lea rdx, str.MINIMAL
mov ecx, edi
movzx eax, word [rsi + rcx*2]
mov r9d, 1
inc rcx
cmp ax, word [rdx + rcx*2 - 2]
jne 0x1004082d0
cmp rcx, 8
jne 0x1004082b1
lea eax, [rcx - 6]
jmp 0x100408336
mov rcx, rdi
lea rdx, str.VERBOSE
nop word [rax + rax]
movzx eax, word [rsi + rcx*2]
inc rcx
cmp ax, word [rdx + rcx*2 - 2]
jne 0x1004082f9
cmp rcx, 8
jne 0x1004082e0
lea eax, [rcx - 5]
jmp 0x100408336
mov rax, rdi
lea r8, str.LEGACY
nop dword [rax]
nop word [rax + rax]
movzx ecx, word [rsi + rax*2]
inc rax
cmp cx, word [r8 + rax*2 - 2]
jne 0x10040832b
cmp rax, 7
jne 0x100408310
cmp cx, word [r8 + rax*2 - 2]
mov eax, r9d
mov ecx, 4
cmove eax, ecx
mov dword [r15 + 0x38], eax
lea r8, str.FALSE
mov qword [rsp + 0x28], r12
lea rdx, str.ForceFlush
mov r9, rsi
mov word [rsi], di
lea rcx, str.Logging
mov dword [rsp + 0x20], 0x800
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ebp, edi
mov rdi, rsi
nop dword [rax]
movzx ecx, word [rdi]
test cx, cx
je 0x10040838f
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_towupper]
mov word [rdi], ax
inc ebp
add rdi, 2
cmp ebp, 0x800
jl 0x100408370
xor ebp, ebp
lea r8, str.FALSE
mov eax, ebp
nop word [rax + rax]
movzx ecx, word [rsi + rax*2]
inc rax
cmp cx, word [r8 + rax*2 - 2]
jne 0x1004083bb
cmp rax, 6
jne 0x1004083a0
cmp cx, word [r8 + rax*2 - 2]
mov eax, ebp
lea rdx, str.TraceFileSizeMB
setne al
lea rcx, str.Logging
mov dword [r15 + 0x34], eax
mov edi, 1
mov r9, r12
mov word [rsi], bp
mov r8d, edi
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
cmp eax, edi
cmovl eax, edi
mov dword [r15 + 0x10a4], eax
mov eax, 2
mul r13
mov rdx, 0xffffffffffffffff
cmovo rax, rdx
mov rcx, rax
call fcn.10040fcd8
mov ecx, 0x1000
mov rdi, rax
call fcn.10040fcd8
mov r9, rbx
mov qword [r15 + 0x18], rax
mov r8, r14
mov rdx, r13
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov r9d, 0x13
lea r8, str.SqlWriterLogger.txt
mov rdx, r13
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
mov r9, qword [r15 + 0x18]
lea rdx, str.TraceFile
mov r8, rdi
mov qword [rsp + 0x28], r12
lea rcx, str.Logging
mov dword [rsp + 0x20], 0x800
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov rdx, r12
mov rcx, r15
call fcn.100407d20
mov rcx, rdi
call fcn.100410100
mov rcx, r12
call fcn.100410100
mov rcx, rsi
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
jmp fcn.100410100