Function at 0x140008d50
Capabilities:
Accept command line arguments
Print debug messages

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
mov r15, rcx
xor edx, edx
add rcx, 8
call fcn.140006830
lea rcx, str._SBuysupplies_OnInitDialog___was_called.
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rax, qword [0x14001a2c0]
lea rcx, [0x14001a2c0]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rcx, [rbp - 0x20]
mov rdx, rax
call fcn.140007c70
mov rcx, qword [r15 + 8]
mov edx, 0x3e8
call qword [sym.imp.USER32.dll_GetDlgItem]
mov ecx, 0xc
mov qword [r15 + 0x90], rax
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov ecx, 0xb
mov edi, eax
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov rcx, qword [0x14001b7b0]
xor r12d, r12d
mov edx, 0xcd
mov r9d, eax
lea r8d, [r12 + 1]
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], edi
call qword [sym.imp.USER32.dll_LoadImageW]
mov rcx, qword [r15 + 8]
lea r8d, [r12 + 1]
mov r9, rax
mov edx, 0x80
call qword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [r12 + 0x32]
call qword [sym.imp.USER32.dll_GetSystemMetrics]
lea ecx, [r12 + 0x31]
mov edi, eax
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov rcx, qword [0x14001b7b0]
lea r8d, [r12 + 1]
mov edx, 0xce
mov r9d, eax
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], edi
call qword [sym.imp.USER32.dll_LoadImageW]
mov rcx, qword [r15 + 8]
xor r8d, r8d
mov edx, 0x80
mov r9, rax
call qword [sym.imp.USER32.dll_SendMessageW]
mov rax, qword [0x14001a2c0]
lea rcx, [0x14001a2c0]
call qword [rax + 0x18]
lea rdi, [0x1400149f0]
mov rbx, rdi
lea rsi, [rax + 0x18]
shr rbx, 0x10
mov qword [rbp - 0x30], rsi
test rbx, rbx
jne 0x140008f04
movzx edi, di
xor edx, edx
mov ecx, edi
call fcn.140006340
test rax, rax
je 0x140008ebd
lea rcx, [rbp - 0x30]
mov r8d, edi
mov rdx, rax
call fcn.1400072a0
mov rsi, qword [rbp - 0x30]
lea rdi, [0x1400149f0]
mov rax, qword [0x14001a2c0]
lea rcx, [0x14001a2c0]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x28], rax
test rbx, rbx
jne 0x140008f19
movzx edi, di
xor edx, edx
mov ecx, edi
call fcn.140006340
test rax, rax
je 0x140008f28
lea rcx, [rbp - 0x28]
mov r8d, edi
mov rdx, rax
call fcn.1400072a0
jmp 0x140008f28
lea rcx, [rbp - 0x30]
xor r8d, r8d
mov rdx, rdi
call fcn.140007380
mov rsi, qword [rbp - 0x30]
jmp 0x140008ec4
lea rcx, [rbp - 0x28]
xor r8d, r8d
mov rdx, rdi
call fcn.140007380
mov r13d, r12d
lea rcx, [0x140014ed8]
or r14d, 0xffffffff
nop word [rax + rax]
mov rdi, qword [rbp - 0x20]
movsxd rax, r13d
lea rbx, [rdi + rax*2]
movsxd rax, dword [rdi - 0x10]
lea r12, [rdi + rax*2]
cmp rbx, r12
jae 0x14000907c
mov rdx, rcx
mov rcx, rbx
call fcn.14000ad58
movsxd rcx, eax
lea rcx, [rbx + rcx*2]
cmp rcx, r12
jae 0x14000907c
lea rdx, [0x140014ed8]
lea r12d, [rax + r13]
call fcn.14000ad9c
test r12d, r12d
mov r13d, 0
mov rbx, rax
lea eax, [rax + r12 + 1]
cmovs r12d, r13d
mov dword [rbp + 0x58], eax
test ebx, ebx
mov eax, 0x7fffffff
cmovs ebx, r13d
sub eax, r12d
cmp eax, ebx
jl 0x1400093ea
mov ecx, dword [rdi - 0x10]
lea eax, [rbx + r12]
cmp eax, ecx
jle 0x140008fc5
mov ebx, ecx
sub ebx, r12d
cmp r12d, ecx
cmovg ebx, r13d
test r12d, r12d
jne 0x140008fe3
cmp ebx, ecx
jne 0x140008fe3
lea rcx, [rdi - 0x18]
call fcn.140006f10
jmp 0x1400090b7
mov rcx, qword [rdi - 0x18]
test rcx, rcx
je 0x140008ffa
mov rax, qword [rcx]
call qword [rax + 0x20]
mov r11, rax
test rax, rax
jne 0x14000900e
mov rax, qword [0x14001a2c0]
lea rcx, [0x14001a2c0]
call qword [rax + 0x20]
mov r11, rax
movsxd rcx, r12d
lea r12, [rdi + rcx*2]
test r11, r11
je 0x1400093df
test r12, r12
jne 0x14000902b
test ebx, ebx
jne 0x1400093c3
mov rax, qword [r11]
mov r8d, 2
mov edx, ebx
mov rcx, r11
call qword [rax]
test rax, rax
je 0x1400093d9
lea rdi, [rax + 0x18]
mov qword [rbp - 0x18], rdi
test ebx, ebx
js 0x1400093ce
cmp ebx, dword [rdi - 0xc]
jg 0x1400093ce
movsxd rax, ebx
mov dword [rdi - 0x10], ebx
mov r8, r12
lea rdx, [rax + rax]
mov rcx, rdi
mov r9, rdx
mov word [rdx + rdi], r13w
call fcn.140009fb4
jmp 0x1400090bf
mov rcx, qword [rdi - 0x18]
mov dword [rbp + 0x58], r14d
test rcx, rcx
je 0x140009094
mov rax, qword [rcx]
call qword [rax + 0x20]
test rax, rax
jne 0x1400090ae
mov rax, qword [0x14001a2c0]
lea rcx, [0x14001a2c0]
call qword [rax + 0x20]
test rax, rax
je 0x140009538
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
lea rdi, [rax + 0x18]
mov qword [rbp - 0x18], rdi
lea r13, [rdi - 0x18]
lea rbx, [rsi - 0x18]
cmp r13, rbx
je 0x140009110
cmp dword [rbx + 0x10], 0
jl 0x140009217
mov rax, qword [rbx]
cmp qword [r13], rax
jne 0x140009217
mov rcx, r13
call fcn.140006f10
mov ecx, r14d
mov rsi, rax
lock xadd dword [rbx + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x140009108
mov rcx, qword [rbx]
mov rdx, rbx
mov rax, qword [rcx]
call qword [rax + 8]
add rsi, 0x18
mov qword [rbp - 0x30], rsi
xor r12d, r12d
lea rdi, [0x1400149f0]
mov ecx, 1
mov eax, r14d
repe cmpsw word [rsi], word [rdi]
setne dil
lock xadd dword [r13 + 0x10], eax
dec eax
test eax, eax
jg 0x140009142
mov rcx, qword [r13]
mov rdx, r13
mov rax, qword [rcx]
call qword [rax + 8]
mov rsi, qword [rbp - 0x30]
test dil, dil
je 0x14000942c
lea rcx, [rbp - 0x28]
mov rdx, rsi
call fcn.140007c70
cmp dword [rsi - 0x10], 0
jl 0x1400093a4
lea rdx, [0x140014ed0]
mov rcx, rsi
call fcn.140009e98
test rax, rax
je 0x140009188
sub rax, rsi
sar rax, 1
cmp eax, 0xffffffff
jne 0x1400093a4
cmp dword [rsi - 0x10], 0
jl 0x1400093a4
lea rdx, [0x140014ec8]
mov rcx, rsi
call fcn.140009e98
test rax, rax
je 0x1400091b5
sub rax, rsi
sar rax, 1
cmp eax, 0xffffffff
jne 0x1400093a4
cmp dword [rsi - 0x10], 0
jl 0x1400093a4
lea rdx, [0x140014ec4]
mov rcx, rsi
call fcn.140009e98
test rax, rax
je 0x140009368
sub rax, rsi
sar rax, 1
cmp eax, 0xffffffff
je 0x140009368
cmp word [rsi], 0
mov rbx, rsi
mov rdi, r12
je 0x140009355
movzx ecx, word [rbx]
call fcn.14000ad4c
test eax, eax
je 0x1400092fd
test rdi, rdi
jne 0x140009300
mov rdi, rbx
jmp 0x140009300
movsxd r12, dword [rdi - 0x10]
test r12d, r12d
jne 0x140009279
mov rdi, qword [rbx]
cmp dword [rbx + 8], r12d
je 0x140009110
cmp dword [rbx + 0x10], r12d
jge 0x14000924d
cmp dword [rsi - 0xc], r12d
jl 0x1400093f5
xor r12d, r12d
mov dword [rsi - 0x10], r12d
mov word [rsi], r12w
jmp 0x140009113
mov eax, r14d
lock xadd dword [rbx + 0x10], eax
dec eax
test eax, eax
jg 0x140009267
mov rcx, qword [rbx]
mov rdx, rbx
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rsi, [rax + 0x18]
jmp 0x14000910c
mov r15d, dword [rsi - 0x10]
mov r14, rdi
sub r14, rsi
sar r14, 1
test r12d, r12d
js 0x14000940b
mov eax, dword [rbx + 0xc]
mov ecx, 1
sub ecx, dword [rbx + 0x10]
sub eax, r12d
or ecx, eax
jge 0x1400092b1
lea rcx, [rbp - 0x30]
mov edx, r12d
call fcn.140006eb0
mov rsi, qword [rbp - 0x30]
movsxd rdx, dword [rsi - 0xc]
lea rbx, [r12 + r12]
mov rcx, rsi
add rdx, rdx
mov r9, rbx
cmp r14, r15
ja 0x1400092d2
lea r8, [rsi + r14*2]
call fcn.14000a8e0
jmp 0x1400092da
mov r8, rdi
call fcn.140009fb4
cmp r12d, dword [rsi - 0xc]
jg 0x140009400
mov r15, qword [rbp + 0x40]
mov dword [rsi - 0x10], r12d
xor r12d, r12d
mov word [rbx + rsi], r12w
or r14d, 0xffffffff
jmp 0x140009113
mov rdi, r12
add rbx, 2
cmp word [rbx], 0
jne 0x1400091f6
test rdi, rdi
je 0x140009355
sub rdi, rsi
sar rdi, 1
test edi, edi
js 0x140009421
mov eax, dword [rsi - 0xc]
mov ecx, 1
sub ecx, dword [rsi - 8]
sub eax, edi
or ecx, eax
jge 0x140009341
lea rcx, [rbp - 0x30]
mov edx, edi
call fcn.140006eb0
mov rsi, qword [rbp - 0x30]
cmp edi, dword [rsi - 0xc]
jg 0x140009416
movsxd rax, edi
mov dword [rsi - 0x10], edi
mov word [rsi + rax*2], r12w
lea rcx, [rbp - 0x30]
call fcn.140007970
mov rsi, qword [rbp - 0x30]
cmp dword [rsi - 0x10], 0
jle 0x1400093a4
cmp dword [rsi - 0x10], 0
jl 0x1400093a4
lea rdx, str.debug
mov rcx, rsi
call fcn.140009e98
test rax, rax
je 0x14000939a
sub rax, rsi
sar rax, 1
cmp eax, 0xffffffff
je 0x14000939a
mov dword [r15 + 0x88], 1
jmp 0x1400093a4
cmp dword [rsi - 0x10], 0
jg 0x14000942c
mov r13d, dword [rbp + 0x58]
lea rcx, [0x140014ed8]
test r13d, r13d
jns 0x140008f40
mov ecx, 0x80070057
call fcn.140003000
int3
mov ecx, 0x80070057
call fcn.140003000
int3
mov ecx, 0x80070057
call fcn.140003000
int3
call fcn.140006a50
int3
mov ecx, 0x80004005
call fcn.140003000
int3
mov ecx, 0x80070216
call fcn.140003000
int3
mov ecx, 0x80070057
call fcn.140003000
int3
mov ecx, 0x80070057
call fcn.140003000
int3
mov ecx, 0x80070057
call fcn.140003000
int3
mov ecx, 0x80070057
call fcn.140003000
int3
mov ecx, 0x80070057
call fcn.140003000
int3
cmp dword [r15 + 0x88], 0
mov rdi, qword [rbp - 0x20]
je 0x140009451
mov rcx, qword [r15 + 8]
lea r8, str.Param
xor r9d, r9d
mov rdx, rdi
call qword [sym.imp.USER32.dll_MessageBoxW]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [rsi - 0x10], 0
mov rdi, qword [rbp - 0x28]
jle 0x140009473
lea rcx, [r15 + 0x80]
mov rdx, rdi
call fcn.140007c70
mov rcx, r15
call fcn.140007ca0
mov rcx, qword [r15 + 0x80]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, qword [r15 + 0x80]
cmp dword [rcx - 0x10], 0
je 0x1400094b6
add rcx, 0xffffffffffffffe8
call fcn.140006f10
lea rdx, [rbp - 0x10]
mov rcx, r15
add rax, 0x18
mov qword [rbp - 0x10], rax
call fcn.1400085d0
test eax, eax
jne 0x1400094c2
mov rcx, qword [r15 + 8]
xor edx, edx
call qword [sym.imp.USER32.dll_EndDialog]
lea rdx, [rdi - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400094dd
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdx, qword [rbp - 0x30]
mov eax, r14d
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400094fc
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdx, qword [rbp - 0x20]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r14d
dec r14d
test r14d, r14d
jg 0x14000951b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov eax, 1
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.140003000
int3