Function at 0x100402730
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
mov esi, ecx
mov rbx, rdx
cmp ecx, 1
jle 0x1004029f0
lea rax, str._listen
mov r12, qword [rdx + 8]
xor edi, edi
lea rcx, str._about
mov qword [rsp + 0x58], rax
lea rax, str._slave
mov ebp, edi
mov qword [rsp + 0x60], rax
mov rdx, r12
lea rax, str._tran
mov qword [rsp + 0x68], rax
call sym.strcmp
test eax, eax
je 0x1004027ae
add rdi, 1
cmp rdi, 4
je 0x1004029f0
mov rcx, qword [rsp + rdi*8 + 0x50]
mov rdx, r12
mov ebp, edi
call sym.strcmp
test eax, eax
jne 0x10040278d
cmp edi, 1
je 0x100402a90
jle 0x100402980
cmp edi, 2
jne 0x100402a10
cmp esi, 5
jle 0x1004029f0
mov rdi, qword [rbx + 0x18]
mov rax, qword [rbx + 0x10]
mov rcx, rdi
mov qword [rsp + 0x40], rax
call sym.atoi
mov dword [rsp + 0x34], eax
cdqe
sub rax, 1
cmp rax, 0xfffe
ja 0x100402b94
mov r12, qword [rbx + 0x28]
mov rax, qword [rbx + 0x20]
mov r15d, 5
mov rcx, r12
mov qword [rsp + 0x38], rax
call sym.atoi
mov dword [rsp + 0x48], eax
cdqe
sub rax, 1
cmp rax, 0xfffe
ja 0x100402a71
cmp dword [rsp + 0x34], 0xffffffff
je 0x1004029f8
cmp dword [rsp + 0x48], 0xffffffff
lea eax, [r15 + 1]
sete dl
test dl, dl
jne 0x1004029f8
cmp esi, eax
jle 0x100402952
add r15d, 2
mov dword [rsp + 0x4c], ebp
xor r14d, r14d
xor r12d, r12d
mov qword [rsp + 0x28], 0
lea rdi, str._hex
lea r13, str._text
mov ebp, r15d
jmp 0x100402899
cmp esi, ebp
jle 0x100402b00
movsxd rax, ebp
mov r12, qword [rbx + rax*8]
lea eax, [rbp + 1]
add ebp, 2
cmp eax, esi
jge 0x1004028da
cdqe
mov rdx, rdi
mov r15, qword [rbx + rax*8]
mov rcx, r15
call sym.strcmp
test eax, eax
je 0x100402880
mov rdx, r13
mov rcx, r15
call sym.strcmp
test eax, eax
jne 0x1004029c0
cmp esi, ebp
jle 0x100402bb1
movsxd rax, ebp
mov r14, qword [rbx + rax*8]
lea eax, [rbp + 1]
add ebp, 2
cmp eax, esi
jl 0x100402899
cmp qword [rsp + 0x28], 0
mov ebp, dword [rsp + 0x4c]
mov rsi, r14
je 0x10040290a
mov rcx, qword [rsp + 0x28]
lea rdx, [0x100405618]
call sym.fopen
mov qword [0x100409018], rax
test rax, rax
je 0x100402c51
test r12, r12
je 0x10040292e
lea rdx, [0x100405618]
mov rcx, r12
call sym.fopen
mov qword [0x100409010], rax
test rax, rax
je 0x100402c80
test rsi, rsi
je 0x100402952
lea rdx, [0x100405618]
mov rcx, rsi
call sym.fopen
mov qword [0x100409008], rax
test rax, rax
je 0x100402cb0
cmp ebp, 2
je 0x100402c32
cmp ebp, 3
je 0x100402c18
cmp ebp, 1
jne 0x1004029f8
movzx edx, word [rsp + 0x48]
movzx ecx, word [rsp + 0x34]
call sym.lcx_listen
jmp 0x1004029f8
test edi, edi
jne 0x1004029f0
call sym.about
mov r15d, 2
mov eax, 3
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x34], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x40], 0
jmp 0x10040284a
lea rdx, str._log
mov rcx, r15
call sym.strcmp
test eax, eax
jne 0x100402bd6
cmp esi, ebp
jle 0x100402bf3
movsxd rax, ebp
mov rax, qword [rbx + rax*8]
mov qword [rsp + 0x28], rax
jmp 0x10040288f
mov rcx, qword [rbx]
call sym.help
xor eax, eax
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp esi, 4
jle 0x1004029f0
mov rdi, qword [rbx + 0x10]
mov rcx, rdi
call sym.atoi
mov dword [rsp + 0x34], eax
cdqe
sub rax, 1
cmp rax, 0xfffe
ja 0x100402b77
mov r12, qword [rbx + 0x20]
mov rax, qword [rbx + 0x18]
mov r15d, 4
mov rcx, r12
mov qword [rsp + 0x38], rax
call sym.atoi
mov qword [rsp + 0x40], 0
mov dword [rsp + 0x48], eax
cdqe
sub rax, 1
cmp rax, 0xfffe
jbe 0x10040282b
call sym.__getreent
mov r8, r12
lea rdx, str._nERROR:__s:_Wrong_port_number_n_n
mov rcx, qword [rax + 0x10]
call sym.fprintf
jmp 0x10040282b
cmp esi, 3
jle 0x1004029f0
mov rdi, qword [rbx + 0x10]
mov rcx, rdi
call sym.atoi
mov dword [rsp + 0x34], eax
cdqe
sub rax, 1
cmp rax, 0xfffe
ja 0x100402b5a
mov rdi, qword [rbx + 0x18]
mov rcx, rdi
call sym.atoi
mov dword [rsp + 0x48], eax
cdqe
sub rax, 1
cmp rax, 0xfffe
ja 0x100402b25
mov qword [rsp + 0x38], 0
mov r15d, 3
mov qword [rsp + 0x40], 0
jmp 0x10040282b
call sym.__getreent
mov r8d, 0x29
mov edx, 1
lea rcx, str._n____ERROR:__hex_Must_supply_file_name._n_n
mov r9, qword [rax + 0x10]
call sym.fwrite
jmp 0x1004029f8
call sym.__getreent
mov r8, rdi
lea rdx, str._nERROR:__s:_Wrong_port_number_n_n
mov r15d, 3
mov rcx, qword [rax + 0x10]
call sym.fprintf
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x40], 0
jmp 0x10040282b
call sym.__getreent
mov r8, rdi
lea rdx, str._nERROR:__s:_Wrong_port_number_n_n
mov rcx, qword [rax + 0x10]
call sym.fprintf
jmp 0x100402abb
call sym.__getreent
mov r8, rdi
lea rdx, str._nERROR:__s:_Wrong_port_number_n_n
mov rcx, qword [rax + 0x10]
call sym.fprintf
jmp 0x100402a37
call sym.__getreent
mov r8, rdi
lea rdx, str._nERROR:__s:_Wrong_port_number_n_n
mov rcx, qword [rax + 0x10]
call sym.fprintf
jmp 0x1004027fa
call sym.__getreent
mov r8d, 0x2a
mov edx, 1
lea rcx, str._n____ERROR:__text_Must_supply_file_name._n_n
mov r9, qword [rax + 0x10]
call sym.fwrite
jmp 0x1004029f8
call sym.__getreent
mov r8, r15
lea rdx, str._n____ERROR:___s__Undefined._n_n
mov rcx, qword [rax + 0x10]
call sym.fprintf
jmp 0x1004029f8
call sym.__getreent
mov r8d, 0x29
mov edx, 1
lea rcx, str._n____ERROR:__log_Must_supply_file_name._n_n
mov r9, qword [rax + 0x10]
call sym.fwrite
jmp 0x1004029f8
movzx ecx, word [rsp + 0x34]
movzx r8d, word [rsp + 0x48]
mov rdx, qword [rsp + 0x38]
call sym.lcx_tran
jmp 0x1004029f8
movzx edx, word [rsp + 0x34]
movzx r9d, word [rsp + 0x48]
mov r8, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
call sym.lcx_slave
jmp 0x1004029f8
call sym.__getreent
mov r8, qword [rsp + 0x28]
lea rdx, str._nERROR:_Can_not_Write_to_File:__s_n_n
mov rcx, qword [rax + 0x10]
call sym.fprintf
cmp qword [0x100409018], 0
je 0x1004029f8
jmp 0x10040290a
call sym.__getreent
mov r8, r12
lea rdx, str._nERROR:_Can_not_Write_to_File:__s_n_n
mov rcx, qword [rax + 0x10]
call sym.fprintf
cmp qword [0x100409010], 0
je 0x1004029f8
jmp 0x10040292e
call sym.__getreent
mov r8, rsi
lea rdx, str._nERROR:_Can_not_Write_to_File:__s_n_n
mov rcx, qword [rax + 0x10]
call sym.fprintf
cmp qword [0x100409008], 0
je 0x1004029f8
jmp 0x100402952