Function at 0x40ff00
Capabilities:
Check for time delay via gettickcount
Check if file exists
Check mutex on windows
Print debug messages

Disassembly:
sub esp, 0x318
mov eax, dword [0x4382c4]
xor eax, esp
mov dword [esp + 0x314], eax
push ebx
push ebp
mov ebp, dword [esp + 0x324]
push esi
push edi
mov ebx, ecx
push ebp
push ebx
push str.MGROnStartService_Servicetype___0x_x___operation___0x_x_
call fcn.00403400
mov eax, dword [0x43af7c]
add esp, 0xc
cmp eax, 2
mov ecx, 0x43b48c
jne 0x40ff69
push ebp
push ebx
push str.client_manager_received_a_message_after_be_stopped_wParam_d_lParam_d
call fcn.0040a090
add esp, 0xc
test ebp, ebp
je 0x41058a
push ebp
push 0x10e4
call fcn.0040ddb0
add esp, 8
jmp 0x41058a
cmp eax, 3
jne 0x40ff78
push str.Failed_to_start_service_because_system_shutdown_
jmp 0x410582
push ebp
push ebx
push str.client_manager_received_a_message_wParam_d_lParam_d
call fcn.0040a090
add esp, 0xc
cmp ebx, 0xff
jne 0x40ff9e
cmp ebp, 6
jne 0x40ff9e
mov dword [0x4395b0], 1
push str.First_time:_GetLoginContext__
call fcn.00403400
mov eax, dword [0x43b7f8]
add esp, 4
push 0x1388
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call fcn.0040f190
mov ecx, dword [0x43b7f8]
push ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test esi, esi
je 0x4103b7
mov ecx, 0xc4
mov esi, 0x43a9c0
lea edi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebp
call fcn.00412470
push 0x104
push 0
push 0x43b350
call fcn.00420f50
mov edx, dword [0x43a9f0]
add esp, 0xc
push edx
call fcn.00412070
add esp, 4
test eax, eax
jne 0x410033
push str.iexplore.exe
push 0x104
push 0x43b350
call fcn.0041aff9
add esp, 0xc
call fcn.0040dfa0
mov eax, dword [esp + 0x1c]
cmp eax, 1
je 0x410146
cmp eax, 2
je 0x410146
test eax, eax
jne 0x41006c
mov eax, dword [esp + 0x18]
cmp eax, 0xff
jne 0x41009c
lea eax, [esp + 0x10]
push eax
call fcn.0040fcc0
jmp 0x410587
cmp eax, 3
jne 0x41012d
cmp dword [esp + 0x18], 0xff
jne 0x41012d
push str.SVN_ST_CMGR__SYS_AU_invoked
call fcn.00403400
add esp, 4
call fcn.00415a80
push 0x64
jmp 0x410389
cmp eax, 0x20
jne 0x4100bd
xor esi, esi
mov edi, eax
call fcn.0040fc10
push 0x4395b8
lea edi, [esp + 0x14]
call fcn.0040c620
jmp 0x41058a
push str.service_stop_message_SYS_STOP_invoked
call fcn.00403400
add esp, 4
push 1
push 0x4395b8
lea ebx, [esp + 0x18]
call fcn.0040cee0
cmp eax, 0xffffffff
mov ebx, dword [esp + 0x18]
jne 0x41010b
cmp ebx, 1
je 0x4100f1
cmp ebx, 2
jne 0x41058a
mov eax, ebx
call fcn.00411f80
push eax
push 0x1080
call fcn.0040ddb0
add esp, 8
jmp 0x41058a
cmp ebx, 1
je 0x410119
cmp ebx, 2
jne 0x41058a
push 0x64
push 0x1080
call fcn.0040ddb0
add esp, 8
jmp 0x41058a
push ebp
push ebx
push str.client_manager_received_an_unknow_message_wParam_d_lParam_d
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 0xc
jmp 0x41058a
mov eax, dword [0x43b340]
test eax, eax
mov ecx, dword [0x43b344]
jne 0x410159
test ecx, ecx
je 0x410172
cmp eax, dword [esp + 0x4c]
jne 0x410165
cmp ecx, dword [esp + 0x48]
je 0x410172
push str.OnStartService._User_login_again_without_exit._Assert
call fcn.00403400
add esp, 4
mov ecx, dword [0x43b7f8]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, dword [esp + 0x18]
push 0x1388
push ecx
call ebp
call fcn.0040f190
mov edx, esi
and edx, 1
cmp dl, 1
jne 0x4101a0
mov byte [0x43ac40], 4
mov eax, esi
and eax, 2
cmp al, 2
jne 0x4101b0
mov byte [0x43ac41], 4
mov ecx, esi
and ecx, 4
cmp cl, 4
jne 0x4101c0
mov byte [0x43ac42], cl
call fcn.0040f260
mov edx, dword [0x43b7f8]
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edx
call ebx
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
call fcn.0040fc10
push 0xa39
push str..SVNCMgr.cpp
push str.Write:_file:_s__line:_d
call fcn.00403400
add esp, 0xc
push 0x4395b8
lea edi, [esp + 0x14]
call fcn.0040c620
cmp eax, 0xffffffff
jne 0x4102d2
mov eax, dword [0x43b7f8]
mov esi, dword [esp + 0x18]
push 0x1388
push eax
call ebp
call fcn.0040f190
mov eax, dword [0x43a9c8]
mov ecx, esi
and ecx, 1
cmp cl, 1
jne 0x41024c
mov edx, eax
and edx, 1
cmp dl, cl
mov byte [0x43ac40], 0
jne 0x41024c
xor eax, 1
mov dword [0x43a9c8], eax
mov ecx, esi
and ecx, 2
cmp cl, 2
jne 0x41026e
mov edx, eax
and edx, 2
cmp dl, cl
mov byte [0x43ac41], 0
jne 0x41026e
xor eax, 2
mov dword [0x43a9c8], eax
mov ecx, esi
and ecx, 4
cmp cl, 4
jne 0x410290
mov edx, eax
and edx, 4
cmp dl, cl
mov byte [0x43ac42], 0
jne 0x410290
xor eax, 4
mov dword [0x43a9c8], eax
call fcn.0040f260
mov eax, dword [0x43b7f8]
push eax
call ebx
push 0xa43
push str..SVNCMgr.cpp
push str.Write1:_file:_s__line:_d
call fcn.00403400
mov ebx, dword [esp + 0x24]
add esp, 0xc
mov eax, ebx
call fcn.00411f80
push eax
push 0x1080
call fcn.0040ddb0
add esp, 8
jmp 0x41058a
cmp eax, 0xfffffc17
jne 0x41039f
mov ecx, dword [0x43b7f8]
mov esi, dword [esp + 0x18]
push 0x1388
push ecx
call ebp
call fcn.0040f190
mov eax, dword [0x43a9c8]
mov edx, esi
and edx, 1
cmp dl, 1
jne 0x41031b
mov ecx, eax
and ecx, 1
cmp cl, dl
mov byte [0x43ac40], 0
jne 0x41031b
xor eax, 1
mov dword [0x43a9c8], eax
mov edx, esi
and edx, 2
cmp dl, 2
jne 0x41033d
mov ecx, eax
and ecx, 2
cmp cl, dl
mov byte [0x43ac41], 0
jne 0x41033d
xor eax, 2
mov dword [0x43a9c8], eax
mov edx, esi
and edx, 4
cmp dl, 4
jne 0x41035f
mov ecx, eax
and ecx, 4
cmp cl, dl
mov byte [0x43ac42], 0
jne 0x41035f
xor eax, 4
mov dword [0x43a9c8], eax
call fcn.0040f260
mov edx, dword [0x43b7f8]
push edx
call ebx
push 0xa4d
push str..SVNCMgr.cpp
push str.Write2:_file:_s__line:_d
call fcn.00403400
add esp, 0xc
push 0x258
mov ebx, dword [esp + 0x1c]
push 0x1080
call fcn.0040ddb0
add esp, 8
jmp 0x41058a
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
mov dword [0x43b340], eax
mov dword [0x43b344], ecx
jmp 0x41058a
test ebp, ebp
jne 0x4103f9
cmp ebx, 0xff
jne 0x4103f9
push 0x310
lea edx, [esp + 0x14]
push ebp
push edx
call fcn.00420f50
add esp, 0xc
push 1
mov dword [esp + 0x1c], ebx
push 0x4395b8
lea ebx, [esp + 0x18]
mov dword [esp + 0x24], 5
call fcn.0040cee0
push ebp
call dword [sym.imp.USER32.dll_PostQuitMessage]
push 0x65
push 0xff
push str.SendMessageToAgent_wParam____d___lParam__d_
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 0xc
cmp dword [0x43b458], 0
je 0x410425
push str.Ending_session__stop_sending_message_to_agent.
jmp 0x41057d
mov eax, dword [0x43ac0c]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x410473
mov ecx, dword [0x43ac0c]
push 0x65
push 0xff
push 0x1080
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
mov edx, dword [0x43ac0c]
push 0x65
push 0xff
push 0x1080
push edx
push str.PostMessage_to_agent_hwnd0x_08x_msg_d_service_d_parm_d
call fcn.00403400
add esp, 0x14
jmp 0x41058a
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
mov ebp, eax
xor edi, edi
call ebx
sub eax, ebp
cmp eax, 0x2710
jae 0x41058a
push str.hAgentWnd_is_invalid_refresh_inter_process_info
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x43b7f8]
push 0x1388
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call fcn.0040f190
mov ecx, dword [0x43b7f8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [0x43ac0c]
push edx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
mov ecx, 0x43b48c
jne 0x410550
push str.Post_message_to_agent_failed
call fcn.0040a090
add esp, 4
push str.GlobalSVNIEAgentControl
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
test eax, eax
jne 0x41050f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x41050f
push str.Ocx_or_plugin_do_not_exist_
call fcn.00403400
add esp, 4
cmp edi, 2
je 0x410578
push 0x1f4
add edi, 1
call dword [sym.imp.KERNEL32.dll_Sleep]
call ebx
push 0x65
push 0xff
mov esi, eax
mov eax, dword [0x43ac0c]
push 0x1080
push eax
push str.PostMessage_to_agent_hwnd0x_08x_msg_d_service_d_parm_d
call fcn.00403400
sub esi, ebp
add esp, 0x14
cmp esi, 0x2710
jb 0x41048e
jmp 0x41058a
push str.IsWindow__TRUE__message_has_sent.
call fcn.0040a090
mov ecx, dword [0x43ac0c]
add esp, 4
push 0x65
push 0xff
push 0x1080
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x41058a
push str.Ocx_or_plugin_do_not_exist_stop_try_to_post_message_to_agent.
mov ecx, 0x43b48c
call fcn.0040a090
add esp, 4
mov ecx, dword [esp + 0x324]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041aec3
add esp, 0x318
ret