Function at 0x40cce0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x6a8
mov eax, dword [str._q_]
xor eax, esp
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x6b4], eax
push 0x104
lea eax, [esp + 0x1b4]
xor ebx, ebx
push eax
push ebx
mov esi, ecx
xor edi, edi
xor ebp, ebp
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x40cd5e
xor eax, eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x18]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
push edx
lea eax, [esp + 0x1b8]
push eax
call fcn.0040dc60
add esp, 0xc
test eax, eax
jne 0x40cd5e
mov eax, dword [esp + 0x14]
mov edi, eax
movzx ebp, ax
mov eax, dword [esp + 0x10]
mov ebx, eax
shr edi, 0x10
shr ebx, 0x10
movzx eax, ax
jmp 0x40cd62
mov eax, dword [esp + 0x18]
mov ecx, dword [esi]
push eax
push ebx
push ebp
push edi
push str.Begin_install_process....__Version__d._d._d._d_
push ecx
call fcn.00404120
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add esp, 0x18
test ecx, ecx
je 0x40cd88
mov ecx, esi
call fcn.0040c070
jmp 0x40cd9d
mov ecx, dword [eax + 0x40]
test ecx, ecx
mov ecx, esi
je 0x40cd98
call fcn.0040c4f0
jmp 0x40cd9d
call fcn.0040cad0
mov ebx, eax
test ebx, ebx
jne 0x40ce2d
mov eax, dword [esi]
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x40ce2d
mov ecx, dword [eax + 0x6c]
test ecx, ecx
jne 0x40ce2d
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x40cdc5
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x40ce2d
push str.Start_agent_service.
push eax
call fcn.00404120
mov edx, dword [esi]
mov eax, dword [edx + 0x1c]
push eax
lea ecx, [esp + 0x38]
push str.KA_s
push ecx
call fcn.0040f6f9
mov edx, dword [esi]
mov eax, dword [edx + 0x54]
add esp, 0x14
test eax, eax
je 0x40cdfd
lea eax, [esp + 0x2c]
push eax
call fcn.00402d00
jmp 0x40ce07
lea ecx, [esp + 0x2c]
push ecx
call fcn.00401140
add esp, 4
test eax, eax
jne 0x40ce20
mov edx, dword [esi]
push str.Agent_service_started.
push edx
call fcn.00404120
add esp, 8
jmp 0x40ce2d
mov ecx, dword [esi]
push str.Failed_to_start_agent_service.
push eax
call fcn.004041b0
mov eax, dword [esi]
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x40ceeb
mov eax, dword [eax + 0x24]
push eax
lea ecx, [esp + 0x30]
push str._sAgentUpdated.txt
push ecx
call fcn.0040f6f9
add esp, 0xc
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40cede
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x134]
push edx
call fcn.00402150
lea eax, [esp + 0x138]
push eax
lea ecx, [esp + 0x2c0]
push str.The_agent_was_updated_and_restarted_on__s.
push ecx
call fcn.0040f6f9
add esp, 0x14
push 0
lea edx, [esp + 0x1c]
push edx
push eax
lea eax, [esp + 0x2c0]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi]
push str.AgentUpdated.txt_is_created.
push ecx
call fcn.00404120
add esp, 8
jmp 0x40ceeb
mov ecx, dword [esi]
push str.Could_not_create_AgentUpdated.txt.
push ebx
call fcn.004041b0
mov edx, dword [esi]
push ebx
push str.End_install_process.___d_
push edx
call fcn.00404120
mov ecx, dword [esp + 0x6c0]
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.0040f175
add esp, 0x6a8
ret