Function at 0x140020300
Capabilities:
Check mutex on windows
Initialize winsock library

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x3d0
lea rbp, [rsp + 0x60]
mov qword [rbp + 0x3b8], rbx
mov rax, qword [0x14005b040]
xor rax, rbp
mov qword [rbp + 0x360], rax
mov rsi, r8
mov qword [0x14005dfd8], rcx
mov r13, rcx
lea rdx, [0x14005d8a0]
xor r14d, r14d
xor r12d, r12d
mov r8d, 0x104
mov dword [rbp + 4], r14d
xor ecx, ecx
mov dword [rbp], r14d
mov dword [rbp + 8], r12d
xor r15d, r15d
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rcx, [0x14005d9b0]
call fcn.1400199f0
xor r9d, r9d
lea r8, str.ExtendedTrace
lea rdx, str.Settings
lea rcx, [0x14005d9b0]
call fcn.140019450
mov dword [0x14005d898], eax
test eax, eax
je 0x1400203b6
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
lea rdx, [0x140054168]
lea rcx, [0x14005d9b0]
call fcn.140019c40
lea rax, str.DHCPServer
mov dword [rsp + 0x28], 0x104
lea r9, [0x140054188]
mov qword [rsp + 0x20], rax
lea r8, str.SERVICENAME
lea rdx, str.Settings
lea rcx, [0x14005d9b0]
call fcn.140019080
lea rax, [0x14005bdf0]
mov dword [rsp + 0x28], 0x104
lea r9, [0x140051ba8]
mov qword [rsp + 0x20], rax
lea r8, str.SERVICEDISPLAYNAME
lea rdx, str.Settings
lea rcx, [0x14005d9b0]
call fcn.140019080
lea rax, [rbp + 0x250]
mov dword [rsp + 0x28], 0x104
lea r9, str.Default
mov qword [rsp + 0x20], rax
lea r8, str.TRAYICON
lea rdx, str.Settings
lea rcx, [0x14005d9b0]
call fcn.140019080
lea rdx, [rbp + 0x250]
lea rcx, str.Default
call fcn.140027214
test eax, eax
je 0x1400204f9
lea rdx, [rbp + 0x250]
lea rcx, str.None
call fcn.140027214
test eax, eax
jne 0x140020490
mov qword [0x14005d9a8], r12
jmp 0x14002050e
mov dword [rsp + 0x28], reloc.WS2_32.dll_recv
lea rdx, [rbp + 0x250]
xor r9d, r9d
mov dword [rsp + 0x20], r12d
mov r8d, 1
xor ecx, ecx
call qword [sym.imp.USER32.dll_LoadImageA]
mov qword [0x14005d9a8], rax
test rax, rax
jne 0x14002050e
cmp dword [0x14005d898], r12d
je 0x1400204f4
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
lea r9, [rbp + 0x250]
lea rdx, str.__X__failed_to_load_icon__s_r_n
lea rcx, [0x14005d9b0]
call fcn.140019c40
mov rax, qword [0x14005d9a8]
test rax, rax
jne 0x14002050e
mov edx, 0x65
mov rcx, r13
call qword [sym.imp.USER32.dll_LoadIconA]
mov qword [0x14005d9a8], rax
mov ecx, 0x202
lea rdx, [rbp + 0xb0]
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov edi, 1
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp + 0x10]
mov edx, 8
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x14002058a
mov rcx, qword [rbp + 0x10]
lea rax, [rbp + 0x74]
mov r9d, 4
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x70]
mov dword [rbp + 0x70], r12d
mov edx, reloc.WS2_32.dll_sendto
mov dword [rbp + 0x74], r12d
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rcx, qword [rbp + 0x10]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x140020584
xor edi, edi
cmp dword [rbp + 0x70], edi
setne dil
test edi, edi
je 0x1400205b8
jmp 0x140020590
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test rax, rax
je 0x1400205b0
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400205b8
xor edi, edi
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x14005dfa4], edi
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rsi + rax], r12b
jne 0x1400205c5
test rax, rax
je 0x140020b1b
mov rax, 0xffffffffffffffff
nop
inc rax
cmp byte [rsi + rax], r12b
jne 0x1400205e0
inc rax
movabs rdx, 0xffffffffffffff0
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x140020602
mov rcx, rdx
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1400455d0
sub rsp, rcx
mov rax, 0xffffffffffffffff
lea r14, [rsp + 0x60]
nop dword [rax]
inc rax
cmp byte [rsi + rax], r12b
jne 0x140020620
inc rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x140020638
mov rcx, rdx
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1400455d0
sub rsp, rcx
cmp dword [0x14005d898], r15d
lea r12, [rsp + 0x60]
je 0x140020674
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r9, rsi
lea rdx, str.__X__command_line_handling_start__s_r_n
mov r8d, eax
lea rcx, [0x14005d9b0]
call fcn.140019c40
xor edi, edi
mov byte [r14], dil
mov byte [r12], dil
movsx ecx, byte [rsi]
call fcn.140026f80
test eax, eax
je 0x1400206a3
mov rbx, rsi
nop dword [rax]
movsx ecx, byte [rbx + 1]
lea rbx, [rbx + 1]
inc edi
call fcn.140026f80
test eax, eax
jne 0x140020690
movsxd rcx, edi
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [rsi + rax], 0
jne 0x1400206b0
lea rdx, [rbp + 0x70]
add rcx, rsi
mov qword [rsp + 0x30], rdx
lea r8, [rbp + 0x74]
mov dword [rsp + 0x28], eax
lea rdx, str._1_____s_n
mov r9d, 2
mov qword [rsp + 0x20], r14
call fcn.140001040
cmp eax, 2
jne 0x140020a15
add edi, dword [rbp + 0x70]
movsxd rbx, edi
add rbx, rsi
movsx ecx, byte [rbx]
call fcn.140026f80
test eax, eax
je 0x140020723
nop dword [rax]
nop word [rax + rax]
movsx ecx, byte [rbx + 1]
lea rbx, [rbx + 1]
inc edi
call fcn.140026f80
test eax, eax
jne 0x140020710
movsxd rcx, edi
add rcx, rsi
movzx eax, byte [rcx]
cmp al, 0x22
jne 0x14002077c
mov r9, 0xffffffffffffffff
nop word [rax + rax]
inc r9
cmp byte [rsi + r9], 0
jne 0x140020740
lea rax, [rbp + 0x70]
mov r8, r12
lea rdx, str.______n
mov qword [rsp + 0x20], rax
call fcn.140001040
test eax, eax
jle 0x1400207bb
mov edx, dword [rbp + 0x70]
lea eax, [rdx + rdi]
movsxd rcx, eax
cmp byte [rcx + rsi], 0x22
jne 0x1400207b9
inc edx
mov dword [rbp + 0x70], edx
jmp 0x1400207b9
sub al, 0x2d
test al, 0xfd
je 0x1400207bb
mov r9, 0xffffffffffffffff
nop dword [rax]
inc r9
cmp byte [rsi + r9], 0
jne 0x140020790
lea rax, [rbp + 0x70]
mov r8, r12
lea rdx, str._s_n
mov qword [rsp + 0x20], rax
call fcn.140001040
test eax, eax
jle 0x1400207bb
mov edx, dword [rbp + 0x70]
add edi, edx
test edi, edi
jle 0x140020a15
lea rdx, str.start
mov rcx, r14
call fcn.140027214
test eax, eax
jne 0x1400207ec
call fcn.140010d80
movsxd rax, edi
mov r15d, 1
add rsi, rax
jmp 0x140020674
lea rdx, str.stop
mov rcx, r14
call fcn.140027214
test eax, eax
jne 0x140020815
call fcn.140010e20
movsxd rax, edi
mov r15d, 1
add rsi, rax
jmp 0x140020674
lea rdx, str.install
mov rcx, r14
call fcn.140027214
test eax, eax
jne 0x14002083e
call fcn.140010bb0
movsxd rax, edi
mov r15d, 1
add rsi, rax
jmp 0x140020674
lea rdx, str.remove
mov rcx, r14
call fcn.140027214
test eax, eax
jne 0x140020867
call fcn.140010ce0
movsxd rax, edi
mov r15d, 1
add rsi, rax
jmp 0x140020674
lea rdx, str.configfirewall
mov rcx, r14
call fcn.140027214
test eax, eax
jne 0x140020890
call fcn.140010780
movsxd rax, edi
mov r15d, 1
add rsi, rax
jmp 0x140020674
lea rdx, str.removefirewall
mov rcx, r14
call fcn.140027214
test eax, eax
jne 0x1400208b9
call fcn.1400109d0
movsxd rax, edi
mov r15d, 1
add rsi, rax
jmp 0x140020674
lea rdx, str.control
mov rcx, r14
call fcn.140027214
test eax, eax
jne 0x1400208fe
lea r9, [0x14001f680]
mov qword [rsp + 0x20], 0
xor r8d, r8d
mov edx, WSAGetLastError
mov rcx, r13
call qword [sym.imp.USER32.dll_DialogBoxParamA]
movsxd rax, edi
mov r15d, 1
add rsi, rax
jmp 0x140020674
lea rdx, str.show
mov rcx, r14
call fcn.140027214
test eax, eax
jne 0x140020923
movsxd rax, edi
add rsi, rax
mov dword [rbp + 8], 1
jmp 0x140020674
lea rdx, str.service
mov rcx, r14
call fcn.140027214
test eax, eax
jne 0x140020964
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
lea rdx, str.__X__bForceRunService__TRUE_r_n
lea rcx, [0x14005d9b0]
call fcn.140019c40
movsxd rax, edi
add rsi, rax
mov dword [rbp], 1
jmp 0x140020674
lea rdx, str.help
mov rcx, r14
call fcn.140027214
test eax, eax
jne 0x1400209a1
xor r9d, r9d
lea r8, str.DHCP_Server_V2.10.0.0
lea rdx, str.Usage:_dhcpsrv__install__remove__stop__start__control__ini__filename___help__runapp_n_n____________install_t_t:_installs_the_DHCP_Server_as_a_service_n____________remove_t_t:_removes_the_service_n____________start_t_t:_starts_the_service_n____________stop_t_t:_stops_the_service_n____________control_t_t:_opens_the_dialog_box_to_control_the_service_n____________help_t_t:_shows_this_message_n____________runapp_t_t:_runs_the_DHCP_Server_in_application_mode__regardless_of_service_installs__n____________ini__filename__t:_sets_the_pathname_of_the_ini_file_to_be_used_by_the_DHCP_Server__default_is_dhcpsrv.ini__n____________show_t_t:_shows_dialog_box_regardless_of_InstallAsService_setting_in_the_ini_file_n____________configfirewall_t:_configures_firewall_exceptios_for_dhcpsrv.exe_n____________removefirewall_t:_remove_firewall_exceptions_for_dhcpsrv.exe_n_n_________command_line_options_are_interpreted_from_left_to_right_and_can_be_given_in_any_order_n_n
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
movsxd rax, edi
mov r15d, 1
add rsi, rax
jmp 0x140020674
lea rdx, str.runapp
mov rcx, r14
call fcn.140027214
test eax, eax
jne 0x1400209c6
movsxd rax, edi
add rsi, rax
mov dword [rbp + 4], 1
jmp 0x140020674
lea rdx, [0x140054654]
mov rcx, r14
call fcn.140027214
test eax, eax
jne 0x140020a0a
mov rax, 0xffffffffffffffff
inc rax
cmp byte [r12 + rax], 0
jne 0x1400209e0
test rax, rax
je 0x140020a0a
mov rdx, r12
lea rcx, [0x14005d9b0]
call fcn.140018b50
lea rcx, [0x14005d9b0]
call fcn.1400199f0
movsxd rax, edi
add rsi, rax
jmp 0x140020674
mov eax, dword [0x14005d898]
test eax, eax
je 0x140020a41
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
lea rdx, str.__X__command_line_handling_end_r_n
lea rcx, [0x14005d9b0]
call fcn.140019c40
mov eax, dword [0x14005d898]
test r15d, r15d
je 0x140020b23
test eax, eax
je 0x140020a6a
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
lea rdx, str.__X__forced_to_end_application_r_n
lea rcx, [0x14005d9b0]
call fcn.140019c40
xor edi, edi
call qword [sym.imp.WS2_32.dll_WSACleanup]
cmp dword [0x14005d898], 0
je 0x140020a97
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
lea rdx, str.__X______DHCP_Server_WinMain_r_n
lea rcx, [0x14005d9b0]
call fcn.140019c40
mov rcx, qword [0x14005df48]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x14005df38]
test rcx, rcx
je 0x140020abf
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rcx, qword [0x14005df40]
mov qword [0x14005df38], rdi
test rcx, rcx
je 0x140020adc
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rcx, qword [0x14005df48]
mov qword [0x14005df40], rdi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
xor eax, eax
mov rcx, qword [rbp + 0x360]
xor rcx, rbp
call fcn.140020e70
mov rbx, qword [rbp + 0x3b8]
lea rsp, [rbp + 0x370]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov eax, dword [0x14005d898]
jmp 0x140020b2b
mov r14d, dword [rbp + 4]
mov r12d, dword [rbp + 8]
test eax, eax
je 0x140020b51
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r9d, 1
lea rdx, str.__X__os_version:_bWinNT_d_r_n
mov r8d, eax
lea rcx, [0x14005d9b0]
call fcn.140019c40
mov ecx, dword [rbp]
call fcn.140020050
xor edi, edi
test eax, eax
jne 0x140020a6c
test r14d, r14d
jne 0x140020c1e
mov dword [rbp], edi
test r12d, r12d
jne 0x140020bac
mov r9d, 0x7b
lea r8, str.InstallAsService
lea rdx, str.Settings
lea rcx, [0x14005d9b0]
call fcn.140019450
lea r8, [rbp]
mov ebx, eax
xor edx, edx
call fcn.140010ee0
cmp rbx, 7
jne 0x140020bac
cmp dword [rbp], edi
je 0x140020c14
cmp dword [0x14005d898], edi
je 0x140020bd0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
lea rdx, str.__X__enter_DialogBox_r_n
lea rcx, [0x14005d9b0]
call fcn.140019c40
lea r9, [0x14001f680]
mov qword [rsp + 0x20], rdi
xor r8d, r8d
mov edx, WSAGetLastError
mov rcx, r13
call qword [sym.imp.USER32.dll_DialogBoxParamA]
cmp dword [0x14005d898], edi
mov rbx, rax
je 0x140020c14
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
lea rdx, str.__X__exit_DialogBox_r_n
lea rcx, [0x14005d9b0]
call fcn.140019c40
cmp rbx, 7
jne 0x140020a6c
lea r8, str.DHCP_7BB1C92E_363E_4331_BBB9_DDF778F5BF16
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x140020c84
xor r9d, r9d
lea r8, str.SingleInstanceApp
lea rdx, str.Settings
lea rcx, [0x14005d9b0]
call fcn.140019450
test eax, eax
je 0x140020c84
mov r9d, 0x40
lea r8, [0x140053f98]
lea rdx, str.DHCP_Server_is_already_running_as_an_application.
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x140020e3f
test rbx, rbx
je 0x140020c92
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp dword [0x14005d898], 0
je 0x140020cb7
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
lea rdx, str.__X__create_window_r_n
lea rcx, [0x14005d9b0]
call fcn.140019c40
lea rax, [0x14001fce0]
mov dword [rbp + 0x20], 3
mov edx, 0x7f00
mov qword [rbp + 0x28], rax
xor ecx, ecx
mov qword [rbp + 0x30], 0
mov qword [rbp + 0x38], r13
mov qword [rbp + 0x40], rdi
call qword [sym.imp.USER32.dll_LoadCursorA]
movdqa xmm0, xmmword [0x1400547f0]
lea rcx, [rbp + 0x20]
mov qword [rbp + 0x48], rax
lea rax, [0x140051ba8]
mov qword [rbp + 0x60], rax
movdqa xmmword [rbp + 0x50], xmm0
call qword [sym.imp.USER32.dll_RegisterClassA]
mov rdx, qword [rbp + 0x60]
mov r9d, 0xcf0000
mov qword [rsp + 0x58], rdi
mov r8, rdx
mov qword [rsp + 0x50], r13
xor ecx, ecx
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
mov dword [rsp + 0x38], 0x80000000
mov dword [rsp + 0x30], 0x80000000
mov dword [rsp + 0x28], 0x80000000
mov dword [rsp + 0x20], 0x80000000
call qword [sym.imp.USER32.dll_CreateWindowExA]
cmp dword [0x14005d898], 0
je 0x140020d7a
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
lea rdx, str.__X__enter_message_loop_r_n
lea rcx, [0x14005d9b0]
call fcn.140019c40
mov rcx, qword [0x14005df48]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x14005df38]
test rcx, rcx
je 0x140020da2
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rcx, qword [0x14005df40]
mov qword [0x14005df38], rdi
test rcx, rcx
je 0x140020dbf
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rcx, qword [0x14005df48]
mov qword [0x14005df40], rdi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
xor r9d, r9d
lea rcx, [rbp + 0x78]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x140020e1a
nop dword [rax]
lea rcx, [rbp + 0x78]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rbp + 0x78]
call qword [sym.imp.USER32.dll_DispatchMessageA]
xor r9d, r9d
lea rcx, [rbp + 0x78]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
jne 0x140020df0
cmp dword [0x14005d898], 0
je 0x140020e3f
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r8d, eax
lea rdx, str.__X__exit_message_loop_r_n
lea rcx, [0x14005d9b0]
call fcn.140019c40
test rbx, rbx
je 0x140020a6c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140020a6c