Function at 0x40dcc0
Capabilities:
Hide graphical window
Set current directory

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x810
cmp eax, 0xeb
push ebx
push ebp
push esi
push edi
ja 0x40e49a
je 0x40e478
dec eax
cmp eax, 0xe7
ja case.0x40e4b0.248
xor ecx, ecx
mov cl, byte [eax + 0x40e624]
jmp dword [ecx*4 + 0x40e60c]
mov eax, dword [0x5189fc]
or esi, 0xffffffff
cmp eax, esi
je case.0x40e4b0.248
mov edx, dword [0x518530]
push 0xe6
push edx
call dword [sym.imp.USER32.dll_KillTimer]
mov eax, dword [esp + 0x824]
push 0x517758
push eax
mov dword [0x4319a0], esi
call fcn.00423420
mov cx, word [0x50dd58]
mov edx, dword [0x517754]
mov eax, dword [0x517758]
push ecx
push edx
push eax
call fcn.00423460
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret
mov ecx, dword [0x518530]
push 0xa
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0x4fafb4
push 0x5187e0
push 0
call fcn.004229c0
mov eax, dword [0x5189f0]
add esp, 0x48
test eax, eax
mov eax, 0x432180
jne 0x40ddb0
mov eax, 0x432178
mov esi, dword [sym.imp.MSVCRT.dll_swprintf]
push eax
lea edx, [esp + 0x14]
push str.INFO:_Passing_IP_address_on_connection:__s.
push edx
call esi
mov ecx, dword [0x51852c]
lea eax, [esp + 0x1c]
push eax
push ecx
call fcn.004239b0
mov eax, dword [0x5189f0]
add esp, 0x14
test eax, eax
jne 0x40e06c
mov ebp, dword [sym.imp.MSVCRT.dll__waccess]
push 0
push 0x5187e0
call ebp
add esp, 8
cmp eax, 0xffffffff
jne 0x40deaa
lea edx, [esp + 0x618]
push 0x104
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, dword [sym.imp.MSVCRT.dll_wcsrchr]
lea eax, [esp + 0x618]
push 0x5c
push eax
call edi
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40de8a
push 0x5c
push 0x5187e0
call edi
add esp, 8
test eax, eax
je 0x40de8a
push 0x5c
push 0x5187e0
mov word [ebx + 2], 0
call edi
add eax, 2
lea ecx, [esp + 0x620]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_wcscat]
lea edx, [esp + 0x628]
push 0
push edx
call ebp
add esp, 0x18
cmp eax, 0xffffffff
je 0x40de8a
lea eax, [esp + 0x618]
push eax
push 0x5187e0
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push 0
push 0x5187e0
call ebp
add esp, 8
cmp eax, 0xffffffff
jne 0x40deaa
push 0x5187e0
push str.FATAL_ERROR:_Cannot_find__s
jmp 0x40e190
mov eax, dword [esp + 0x824]
push 0
push 0
push 0
push 0x5093b0
push 0x5187e0
push 2
push eax
call fcn.00413260
add esp, 0x1c
test eax, eax
je 0x40e028
mov edi, str.localhost
mov eax, 0x50dd5a
mov dl, byte [eax]
mov bl, byte [edi]
mov cl, dl
cmp dl, bl
jne 0x40df06
test cl, cl
je 0x40df02
mov dl, byte [eax + 1]
mov bl, byte [edi + 1]
mov cl, dl
cmp dl, bl
jne 0x40df06
add eax, 2
add edi, 2
test cl, cl
jne 0x40dede
xor eax, eax
jmp 0x40df0b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40e028
push 0x5187e0
lea eax, [esp + 0x14]
push str.INFO:__s_read_OK.
push eax
call esi
mov edx, dword [0x51852c]
lea ecx, [esp + 0x1c]
push ecx
push edx
call fcn.004239b0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0x4faba4
push 0
push 0
push 0x4fa99c
push 0
push 0x4fadac
push 0x4fafb4
push 0x5187e0
push 0x5093b0
call fcn.004229c0
add esp, 0x5c
push 0x443c18
push 0x4fadac
push str._s_s
push 0x517994
call esi
add esp, 0x10
call fcn.0040fba0
cmp dword [0x50dd94], 0x5f0c7fdf
je 0x40dfed
call fcn.00425fbe
test ax, ax
jne 0x40dfed
mov eax, dword [0x518524]
test eax, eax
je 0x40dfed
push str.Hardware_Key_Missing
push str.System_Starting...
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov eax, dword [0x518524]
add esp, 8
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
call fcn.004108f0
mov ecx, dword [0x51852c]
push str.System_Starting...
push ecx
mov dword [0x518524], eax
call fcn.004239b0
add esp, 8
call fcn.0040fa90
cmp eax, 0xffffffff
mov dword [0x5185c8], eax
jne 0x40e014
push str.FATAL_ERROR:_Cannot_setup_socket_communication_
call fcn.004109d0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret
push 0x517994
lea edx, [esp + 0x14]
push str.INFO:_Using:__s.
push edx
jmp 0x40e1e5
mov eax, dword [0x518530]
push 0
push 0x1388
push 0xa
push eax
call dword [sym.imp.USER32.dll_SetTimer]
push 0x5187e0
lea ecx, [esp + 0x14]
push str.ERROR:_Configuration.ini___s__faulty_or_missing__Retrying...
push ecx
call esi
mov eax, dword [0x51852c]
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.004239b0
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret
push 0x443c18
push 0x4fafb4
push str._s_s
push 0x517994
call esi
push str.Alarm.ini
push 0x4fafb4
push str._s_s
push 0x4faba4
call esi
mov ebp, dword [sym.imp.MSVCRT.dll__waccess]
push 0
push 0x517994
call ebp
add esp, 0x28
cmp eax, 0xffffffff
jne 0x40e16a
push 0x443c18
push str.configuration_
push 0x4fafb4
push str._s_s_s
push 0x517994
call esi
push str.ConfigurationAlarm.ini
push 0x4fafb4
push str._s_s
push 0x4faba4
call esi
push 0
push 0x517994
call ebp
add esp, 0x2c
cmp eax, 0xffffffff
jne 0x40e16a
lea ecx, [esp + 0x410]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebx, dword [sym.imp.MSVCRT.dll__wcsrev]
lea edx, [esp + 0x410]
push edx
call ebx
lea eax, [esp + 0x414]
push 0x5c
push eax
call dword [sym.imp.MSVCRT.dll_wcschr]
mov edi, eax
push edi
call ebx
push edi
push 0x4fafb4
call dword [sym.imp.MSVCRT.dll_wcscpy]
push 0x443c18
push 0x4fafb4
push str._s_s
push 0x517994
call esi
push str.Alarm.ini
push 0x4fafb4
push str._s_s
push 0x4faba4
call esi
add esp, 0x38
push 0x4fafb4
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0
push 0x517994
call ebp
add esp, 8
cmp eax, 0xffffffff
jne 0x40e1af
push 0x517994
push str.FATAL_ERROR:_Cannot_find_configuration_file__r_n__s_
lea ecx, [esp + 0x18]
push ecx
call esi
lea edx, [esp + 0x1c]
push edx
call fcn.004109d0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret
call fcn.0040fa90
cmp eax, 0xffffffff
mov dword [0x5185c8], eax
jne 0x40e1d6
push str.FATAL_ERROR:_Cannot_start_OCM_Viewer_
call fcn.004109d0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret
push 0x517994
lea eax, [esp + 0x14]
push str.INFO:_Using:__s.
push eax
call esi
mov edx, dword [0x51852c]
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
push edx
call fcn.004239b0
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret
mov eax, dword [0x518530]
push 0x17
push eax
call dword [sym.imp.USER32.dll_KillTimer]
mov ecx, dword [0x4319a0]
push ecx
push 0x476a20
push 0
push 0
push 0xffffffffffffffff
push 0x107
push 0x22d
call fcn.004257a0
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret
mov al, byte [0x5189f6]
cmp al, 0x1e
jb case.0x40e4b0.248
cmp al, 0x28
jae case.0x40e4b0.248
mov ecx, 0x10
xor eax, eax
mov edi, 0x443bbc
rep stosd dword es:[edi], eax
call fcn.00425fbe
test ax, ax
mov word [0x5189f4], ax
jle 0x40e2c2
push eax
push 1
push 2
push 7
push 0x443bd8
push 0x3c6205
call fcn.004262d1
mov dx, word [0x5189f4]
push edx
push 1
push 0x443bd8
push 0x3c6205
call fcn.00426671
mov ax, word [0x5189f4]
push eax
push 1
push 0x3c6205
call fcn.004266e0
mov dword [0x443be4], eax
jmp 0x40e2cc
mov dword [0x443be4], 0x5f0c7fdf
push str.Info
push 0x5185d8
call dword [sym.imp.MSVCRT.dll_wcsstr]
add esp, 8
cmp word [0x5189f4], 0
jle 0x40e321
test eax, eax
mov eax, str.Info
jne 0x40e2f7
mov eax, 0x4401b4
mov esi, dword [sym.imp.MSVCRT.dll_swprintf]
push eax
push 0x431b48
lea ecx, [esp + 0x418]
push str._s:_s
push ecx
call esi
add esp, 0x10
mov dword [0x5189f8], 0x12d
jmp 0x40e357
test eax, eax
mov eax, str.Info
jne 0x40e32f
mov eax, 0x4401b4
mov esi, dword [sym.imp.MSVCRT.dll_swprintf]
push eax
push str.OCM_Viewer
lea edx, [esp + 0x418]
push str._s:_s
push edx
call esi
add esp, 0x10
mov dword [0x5189f8], 0x12e
lea eax, [esp + 0x410]
push 0x5185d8
push eax
call dword [sym.imp.MSVCRT.dll_wcscmp]
add esp, 8
test eax, eax
je case.0x40e4b0.248
lea ecx, [esp + 0x410]
push 0x104
push ecx
push 0x5185d8
call fcn.00423f90
mov edx, dword [0x517970]
push edx
push 0x5185d8
push str._s_d
push 0x5176e0
call esi
push 0x517690
push 0x5176e0
lea eax, [esp + 0x34]
push str._s__s
push eax
call esi
mov edx, dword [0x518530]
add esp, 0x2c
lea ecx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov eax, dword [0x517990]
push 0x541
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_RedrawWindow]
mov ecx, dword [0x51775c]
push 0x40
push 0x443bbc
push 0x10
push 0
push ecx
call fcn.004237a0
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret
mov eax, dword [0x518520]
test eax, eax
jne case.0x40e4b0.248
mov eax, dword [0x4fb314]
test eax, eax
je case.0x40e4b0.248
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ecx, dword [0x517990]
cmp eax, ecx
je 0x40e44a
push ecx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push 0xffffffffffffffff
call fcn.00408910
mov ecx, dword [0x517990]
add esp, 4
push 3
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
mov edx, dword [esp + 0x824]
push 0
push 0x1b7740
push pe_nt_image_headers32
push edx
call dword [sym.imp.USER32.dll_SetTimer]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret
mov eax, dword [0x4fb314]
test eax, eax
je case.0x40e4b0.248
call fcn.00410a10
pop edi
pop esi
pop ebp
mov dword [0x518528], eax
pop ebx
add esp, 0x810
ret
add eax, 0xffffff0d
cmp eax, 0x4f
ja case.0x40e4b0.248
xor ecx, ecx
mov cl, byte [eax + 0x40e724]
jmp dword [ecx*4 + 0x40e70c]
mov edx, dword [0x51775c]
push 0
push 0
push 3
push 0
push edx
call fcn.004237a0
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret
mov eax, dword [0x518530]
push 0xf6
push eax
call dword [sym.imp.USER32.dll_KillTimer]
pop edi
pop esi
pop ebp
mov dword [0x4319e0], 1
mov dword [0x5189ec], 0
pop ebx
add esp, 0x810
ret
mov ecx, dword [0x518530]
push 0xf3
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
push 0x2000
call fcn.00408910
mov eax, dword [0x443130]
add esp, 4
test eax, eax
je case.0x40e4b0.248
mov eax, dword [0x443134]
test eax, eax
je 0x40e547
mov edx, dword [0x443120]
push edx
jmp 0x40e54d
mov eax, dword [0x44311c]
push eax
mov esi, dword [sym.imp.USER32.dll_BringWindowToTop]
call esi
mov eax, dword [0x430fd0]
test eax, eax
mov eax, dword [0x440488]
jl 0x40e59c
mov ecx, dword [0x51859c]
test ecx, ecx
je 0x40e59c
cmp eax, 0x1f4
jl 0x40e5aa
cmp eax, 0x207
jg 0x40e59c
mov ecx, dword [0x443100]
push ecx
call esi
push 0x440488
call fcn.00410b90
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret
cmp eax, 0x1f4
jl 0x40e5aa
cmp eax, 0x207
jle 0x40e5b4
mov dword [0x51859c], 0
push 0x440488
call fcn.00410b90
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret
mov edx, dword [0x518530]
push 0xf5
push edx
call dword [sym.imp.USER32.dll_KillTimer]
push 0xffffffffffffffff
call fcn.00408640
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret
push 0
push 0
push 0x3e
call fcn.00410130
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x810
ret