Function at 0x140038740
Capabilities:
Create thread
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rdi, rcx
xor r14d, r14d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ebx, eax
xorps xmm0, xmm0
movups xmmword [rbp - 0x20], xmm0
mov qword [rbp - 0x10], r14
mov qword [rbp - 8], r14
lea r8d, [r14 + 0x16]
lea rdx, str.FLiNGTrainerNamedPipe_
lea rcx, [rbp - 0x20]
call fcn.1400054a0
mov r8d, ebx
lea rdx, [rbp - 0x20]
mov rcx, rdi
call fcn.140031350
test al, al
je 0x140038c82
xorps xmm0, xmm0
movups xmmword [rbp - 0x20], xmm0
mov qword [rbp - 0x10], r14
mov qword [rbp - 8], r14
lea r8d, [r14 + 0x33]
lea rdx, str._n0hQb
lea rcx, [rbp - 0x20]
call fcn.1400054a0
lea rdx, [rbp - 0x20]
mov rcx, rdi
call fcn.140037170
lea rcx, [rdi + 0x458]
cmp qword [rcx + 0x18], 0x4a5
jb 0x140038805
mov rbx, qword [rcx]
mov qword [rcx + 0x10], 0x4a5
mov r8d, 0x94a
lea rdx, [0x1400c6480]
mov rcx, rbx
call fcn.14009bca0
mov word [rbx + 0x94a], r14w
jmp 0x140038816
lea r9, [0x1400c6480]
mov edx, 0x4a5
call fcn.140021340
lea rcx, [rdi + 0x478]
cmp qword [rcx + 0x18], 0x588
jb 0x140038851
mov rbx, qword [rcx]
mov qword [rcx + 0x10], 0x588
mov r8d, 0xb10
lea rdx, str._n_nNum_1___Edit_Food_nNum_2___Edit_Stones_nNum_3___Edit_Wood_nNum_4___Edit_Bronze_nNum_5___Edit_Gold_nNum_6___Infinite_Units_Movement_Only_works_in_the_campaign_map._nNum_7___Infinite_Units_Health_Only_works_in_the_campaign_map._nNum_8___One_Turn_Recruit_Activate_before_recruiting._nNum_9___One_Turn_Construction_Activate_before_selecting_buildings._nNum_0___One_Turn_Complete_Royal_Decrees_Takes_effect_when_you_open_the_royal_decrees_menu._nNum_.___Unlock_All_Royal_Decrees_Takes_effect_when_you_open_the_royal_decrees_menu._n_nAfter_unlocking_royal_decrees__you_will_need_to_save_and_reload_the_game_in_order_to_apply_their_effects._nNum____AI_Units_Cant_Move_Only_works_in_the_campaign_map._nNum_____Empty_AI_Units_Health_Only_works_in_the_campaign_map._n_nCtrlNum_1___Max_City_Happiness_Takes_effect_when_you_click_on_a_city._nCtrlNum_2___Max_City_Workforce_Takes_effect_when_you_click_on_a_city._nCtrlNum_3___Edit_Character_Exp_Takes_effect_when_you_open_the_character_details_menu._nCtrlNum_4___Edit_Character_Skill_Points_Takes_effect_when_you_open_the_character_details_menu._nCtrlNum_5___Diplomacy_Always_Succeed_Disable_this_option_after_you_are_done_with_diplomacy__otherwise_it_will_also_work_for_AI._nCtrlNum_6___Set_Game_Speed_n_nAltNum_1___God_Mode__In_Battle__nAltNum_2___Infinite_Ammo_nAltNum_3___Empty_Enemies_Ammo_nAltNum_4___Max_Morale_nAltNum_5___Empty_Enemies_Morale__Fast_Win__n_n
mov rcx, rbx
call fcn.14009bca0
mov word [rbx + 0xb10], r14w
jmp 0x140038862
lea r9, str._n_nNum_1___Edit_Food_nNum_2___Edit_Stones_nNum_3___Edit_Wood_nNum_4___Edit_Bronze_nNum_5___Edit_Gold_nNum_6___Infinite_Units_Movement_Only_works_in_the_campaign_map._nNum_7___Infinite_Units_Health_Only_works_in_the_campaign_map._nNum_8___One_Turn_Recruit_Activate_before_recruiting._nNum_9___One_Turn_Construction_Activate_before_selecting_buildings._nNum_0___One_Turn_Complete_Royal_Decrees_Takes_effect_when_you_open_the_royal_decrees_menu._nNum_.___Unlock_All_Royal_Decrees_Takes_effect_when_you_open_the_royal_decrees_menu._n_nAfter_unlocking_royal_decrees__you_will_need_to_save_and_reload_the_game_in_order_to_apply_their_effects._nNum____AI_Units_Cant_Move_Only_works_in_the_campaign_map._nNum_____Empty_AI_Units_Health_Only_works_in_the_campaign_map._n_nCtrlNum_1___Max_City_Happiness_Takes_effect_when_you_click_on_a_city._nCtrlNum_2___Max_City_Workforce_Takes_effect_when_you_click_on_a_city._nCtrlNum_3___Edit_Character_Exp_Takes_effect_when_you_open_the_character_details_menu._nCtrlNum_4___Edit_Character_Skill_Points_Takes_effect_when_you_open_the_character_details_menu._nCtrlNum_5___Diplomacy_Always_Succeed_Disable_this_option_after_you_are_done_with_diplomacy__otherwise_it_will_also_work_for_AI._nCtrlNum_6___Set_Game_Speed_n_nAltNum_1___God_Mode__In_Battle__nAltNum_2___Infinite_Ammo_nAltNum_3___Empty_Enemies_Ammo_nAltNum_4___Max_Morale_nAltNum_5___Empty_Enemies_Morale__Fast_Win__n_n
mov edx, 0x588
call fcn.140021340
mov rcx, rdi
call fcn.140035e00
mov rcx, rdi
call fcn.1400360f0
lea r15, [0x1400de270]
mov esi, dword [0x1400ddc48]
test esi, esi
je 0x14003892e
mov ebx, dword [0x1400ddc4c]
test ebx, ebx
je 0x14003892e
mov rcx, r15
call fcn.140076798
test eax, eax
jne 0x140038c96
mov eax, dword [0x1400de2bc]
cmp eax, 0x7fffffff
je 0x140038ca1
mov dword [rbp + 0x40], 9
mov dword [rbp + 0x38], r14d
mov qword [rsp + 0x20], r14
lea r9, [rbp + 0x38]
mov r8d, 4
lea rdx, [rbp + 0x40]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [rbp + 0x40], esi
mov dword [rbp + 0x38], r14d
mov qword [rsp + 0x20], r14
lea r9, [rbp + 0x38]
mov r8d, 4
lea rdx, [rbp + 0x40]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [rbp + 0x40], ebx
mov dword [rbp + 0x38], r14d
mov qword [rsp + 0x20], r14
lea r9, [rbp + 0x38]
mov r8d, 4
lea rdx, [rbp + 0x40]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r15
call fcn.1400767a0
mov rcx, rdi
call fcn.140038d10
lea rbx, [rdi + 0x578]
mov r8, rbx
lea rdx, str.Cover
mov ecx, 0x75
call fcn.140042500
mov rax, qword [rbx + 8]
cmp rax, qword [rbx]
je 0x140038a02
mov rcx, r15
call fcn.140076798
test eax, eax
jne 0x140038c96
mov eax, dword [0x1400de2bc]
cmp eax, 0x7fffffff
je 0x140038ca1
mov dword [rbp + 0x40], 3
mov dword [rbp + 0x38], r14d
mov qword [rsp + 0x20], r14
lea r9, [rbp + 0x38]
mov r8d, 4
lea rdx, [rbp + 0x40]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, qword [rbx + 8]
sub rax, qword [rbx]
mov dword [rbp + 0x40], eax
mov dword [rbp + 0x38], r14d
mov qword [rsp + 0x20], r14
lea r9, [rbp + 0x38]
mov r8d, 4
lea rdx, [rbp + 0x40]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, qword [rbx]
mov qword [rbp + 0x40], rax
mov dword [rbp + 0x38], r14d
mov qword [rsp + 0x20], r14
lea r9, [rbp + 0x38]
mov r8d, 8
lea rdx, [rbp + 0x40]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r15
call fcn.1400767a0
mov rcx, r15
call fcn.140076798
test eax, eax
jne 0x140038c96
mov eax, dword [0x1400de2bc]
cmp eax, 0x7fffffff
je 0x140038ca1
mov dword [rbp + 0x40], 5
mov dword [rbp + 0x38], r14d
mov qword [rsp + 0x20], r14
lea r9, [rbp + 0x38]
mov r8d, 4
lea rdx, [rbp + 0x40]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea rax, [0x140035ae0]
mov qword [rbp + 0x40], rax
mov dword [rbp + 0x38], r14d
mov qword [rsp + 0x20], r14
lea r9, [rbp + 0x38]
mov r8d, 8
lea rdx, [rbp + 0x40]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r15
call fcn.1400767a0
lea r8, [rdi + 0x478]
lea rdx, [rdi + 0x458]
call fcn.14004fb30
mov qword [rbp + 0x48], r15
mov rcx, r15
call fcn.140076798
test eax, eax
jne 0x140038c96
mov eax, dword [0x1400de2bc]
cmp eax, 0x7fffffff
je 0x140038ca1
mov dword [rbp + 0x40], 4
mov dword [rbp + 0x38], r14d
mov qword [rsp + 0x20], r14
lea r9, [rbp + 0x38]
mov r8d, 4
lea rdx, [rbp + 0x40]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea rdx, [rdi + 0x458]
lea rcx, [rbp - 0x20]
call fcn.14001e4f0
mov rdx, rax
mov rcx, rdi
call fcn.140031740
lea rdx, [rdi + 0x478]
lea rcx, [rbp - 0x20]
call fcn.14001e4f0
mov rdx, rax
mov rcx, rdi
call fcn.140031740
nop
mov rcx, r15
call fcn.1400767a0
mov ecx, 8
call fcn.140077744
mov qword [rax], rdi
mov qword [rbp + 0x38], rax
lea rcx, [rbp - 0x28]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], r14d
mov r9, rax
lea r8, [0x14003dc90]
xor edx, edx
xor ecx, ecx
call fcn.140087adc
mov qword [rbp - 0x30], rax
test rax, rax
je 0x140038cf9
cmp dword [rbp - 0x28], 0
je 0x140038cee
movaps xmm0, xmmword [rbp - 0x30]
movdqa xmmword [rbp - 0x20], xmm0
lea rcx, [rbp - 0x20]
call fcn.140076a80
test eax, eax
jne 0x140038cee
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x30], xmm0
lea ecx, [rax + 8]
call fcn.140077744
mov qword [rax], rdi
mov qword [rbp + 0x38], rax
lea rcx, [rbp - 0x28]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], r14d
mov r9, rax
lea r8, [0x14003dcc0]
xor edx, edx
xor ecx, ecx
call fcn.140087adc
mov qword [rbp - 0x30], rax
test rax, rax
je 0x140038cdf
cmp dword [rbp - 0x28], 0
je 0x140038cd4
movaps xmm0, xmmword [rbp - 0x30]
movdqa xmmword [rbp - 0x20], xmm0
lea rcx, [rbp - 0x20]
call fcn.140076a80
test eax, eax
jne 0x140038cd4
call fcn.140034a20
mov ecx, 8
call fcn.140077744
mov qword [rax], rdi
mov qword [rbp + 0x38], rax
lea rcx, [rbp - 0x38]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], r14d
mov r9, rax
lea r8, [0x14003db00]
xor edx, edx
xor ecx, ecx
call fcn.140087adc
mov qword [rbp - 0x40], rax
test rax, rax
je 0x140038cc5
cmp dword [rbp - 0x38], 0
je 0x140038cba
movaps xmm0, xmmword [rbp - 0x40]
movdqa xmmword [rbp - 0x20], xmm0
lea rcx, [rbp - 0x20]
call fcn.140076a80
test eax, eax
jne 0x140038cba
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x40], xmm0
cmp byte [rdi + 0x4b9], al
jne 0x140038c7c
nop
mov ecx, 0xc8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, rdi
call fcn.1400357b0
cmp byte [rdi + 0x4b9], 0
je 0x140038c60
cmp dword [rbp - 0x38], 0
jne 0x140038cb4
mov rbx, qword [rsp + 0xa0]
add rsp, 0x70
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
mov ecx, 5
call fcn.1400766e8
int3
dec eax
mov dword [0x1400de2bc], eax
mov ecx, 6
call fcn.1400766e8
int3
call fcn.140087990
nop
mov ecx, 1
call fcn.1400766e8
nop
mov dword [rbp - 0x38], r14d
mov ecx, 6
call fcn.1400766e8
nop
mov ecx, 1
call fcn.1400766e8
nop
mov dword [rbp - 0x28], r14d
mov ecx, 6
call fcn.1400766e8
nop
mov ecx, 1
call fcn.1400766e8
nop
mov dword [rbp - 0x28], r14d
mov ecx, 6
call fcn.1400766e8
int3