Function at 0x410120
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x583756
mov eax, dword fs:[0]
push eax
sub esp, 0x93c
mov eax, dword [0x603d70]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0xa4]
test ecx, ecx
je 0x410164
push 0
call fcn.0046800c
mov ecx, dword [esi + 0x20]
push 0
call fcn.0046800c
jmp 0x410180
mov eax, dword [esi + 0xcc]
push str.gcheck.exe
push eax
push 0x5a4028
lea ecx, [ebp - 0x218]
push 0x104
push ecx
call fcn.0055dd6b
push 0
lea edx, [ebp - 0x218]
push edx
mov eax, edx
push eax
push 1
call fcn.00560847
add esp, 0x24
push 0x7d0
call dword [0x5a2280]
mov eax, dword [esi + 0xcc]
push 0x5a48cc
push eax
push 0x5a4028
lea ecx, [ebp - 0x418]
push 0x200
push ecx
call fcn.0055dd6b
add esp, 0x14
call dword [0x5a2970]
push eax
call fcn.0055f9c5
mov edx, dword [esi + 0xd4]
mov eax, dword [esi + 0xcc]
push edx
lea ecx, [ebp - 0x418]
push ecx
push eax
push 0x5a5890
call fcn.00401000
push 0x103
lea edx, [ebp - 0x113]
push 0
push edx
mov byte [ebp - 0x114], 0
call fcn.0055d200
mov eax, dword [esi + 0xd4]
push eax
lea eax, [ebp - 0x418]
push eax
push str.CmxstartupApp::RunGame__s__s:_n
lea ecx, [ebp - 0x114]
push 0x104
push ecx
call fcn.0055e500
mov ebx, dword [0x5a229c]
add esp, 0x34
lea edx, [ebp - 0x114]
push edx
call ebx
call fcn.00401050
mov edi, eax
push edi
push str.CmxstartupApp::RunGame_Report1__d:_n
lea eax, [ebp - 0x114]
push 0x104
push eax
mov dword [ebp - 0x92c], edi
call fcn.0055e500
add esp, 0x10
lea ecx, [ebp - 0x114]
push ecx
call ebx
lea edx, [ebp - 0x114]
push edx
push str.report
call fcn.00401000
add esp, 8
test edi, edi
jns 0x410738
mov ecx, esi
call fcn.0040f660
mov ecx, esi
call fcn.0040fc30
mov eax, dword [esi + 0x368]
mov eax, dword [eax]
mov dword [ebp - 0x940], eax
mov eax, dword [esi + 0x374]
mov ecx, dword [eax]
mov byte [ebp - 0x925], 0
mov dword [ebp - 0x93c], ecx
mov edi, dword [esi + 0x35c]
mov eax, edi
cmp eax, edi
jae 0x4102ec
mov ebx, dword [esi + 0x360]
cmp ebx, 0x10
jb 0x4102ff
mov eax, dword [esi + 0x34c]
jmp 0x410305
lea eax, [esi + 0x34c]
push 0
push 0x5a44ca
push eax
call fcn.00402870
add esp, 0xc
test eax, eax
jne 0x410320
test edi, edi
setne al
test eax, eax
sete al
test al, al
sete al
test al, al
je 0x410375
cmp byte [ebp - 0x925], 0
jne 0x410375
cmp ebx, 0x10
jb 0x410342
mov ecx, dword [esi + 0x34c]
jmp 0x410348
lea ecx, [esi + 0x34c]
mov eax, dword [esi + 0xcc]
push ecx
push eax
push 0x5a4028
lea edx, [ebp - 0x618]
push 0x200
push edx
call fcn.0055dd6b
add esp, 0x14
mov byte [ebp - 0x925], 1
jmp 0x41044e
mov ebx, dword [ebp - 0x940]
cmp ebx, dword [esi + 0x368]
je 0x4103e0
cmp dword [ebx + 0x1c], 0x10
lea edi, [ebx + 8]
jb 0x410390
mov ecx, dword [edi]
jmp 0x410392
mov ecx, edi
mov eax, dword [esi + 0xcc]
push ecx
push eax
push 0x5a4028
lea eax, [ebp - 0x618]
push 0x200
push eax
call fcn.0055dd6b
add esp, 0x14
cmp dword [edi + 0x14], 0x10
jb 0x4103bb
mov edi, dword [edi]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4103c0
sub eax, edx
push eax
push edi
lea ecx, [esi + 0x34c]
call fcn.00406f50
mov ecx, dword [ebx]
mov dword [ebp - 0x940], ecx
jmp 0x41044e
mov ebx, dword [ebp - 0x93c]
cmp ebx, dword [esi + 0x374]
je 0x4107c2
cmp dword [ebx + 0x1c], 0x10
lea edi, [ebx + 8]
jb 0x4103ff
mov ecx, dword [edi]
jmp 0x410401
mov ecx, edi
mov eax, dword [esi + 0xcc]
push ecx
push eax
push 0x5a4028
lea edx, [ebp - 0x618]
push 0x200
push edx
call fcn.0055dd6b
add esp, 0x14
cmp dword [edi + 0x14], 0x10
jb 0x41042a
mov edi, dword [edi]
mov eax, edi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410430
sub eax, edx
push eax
push edi
lea ecx, [esi + 0x34c]
call fcn.00406f50
mov eax, dword [ebx]
mov dword [ebp - 0x93c], eax
push 0x5a3fcc
push str.record_run.dat
mov byte [ebp - 0x930], 0x13
call fcn.0055ead8
mov edi, eax
add esp, 8
test edi, edi
je 0x4104ae
lea ecx, [ebp - 0x948]
push ecx
call fcn.0055e3d8
push 2
push 0
push edi
call fcn.0055e9a0
push edi
push 1
lea edx, [ebp - 0x930]
push 1
push edx
call fcn.0055e89c
push edi
push 1
lea eax, [ebp - 0x948]
push 8
push eax
call fcn.0055e89c
push edi
call fcn.0055e6d1
add esp, 0x34
mov eax, dword [esi + 0xd4]
push 0x5a44ca
push eax
call fcn.0055eddd
add esp, 8
test eax, eax
setne al
test al, al
je 0x41058d
push str.auto:
lea ecx, [ebp - 0x934]
call fcn.0040a230
mov eax, dword [esi + 0xd4]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x934]
mov dword [ebp - 4], 0
call fcn.00406340
mov eax, dword [esi + 0xd8]
push 0x5a44ca
push eax
call fcn.0055eddd
add esp, 8
test eax, eax
setne al
test al, al
je 0x410541
push 1
push 0x5a5834
lea ecx, [ebp - 0x934]
call fcn.00406340
mov eax, dword [esi + 0xd8]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x934]
call fcn.00406340
mov ecx, dword [ebp - 0x934]
push ecx
push 0x5a5824
call fcn.00401000
mov edx, dword [ebp - 0x934]
mov ecx, dword [ebp - 0x92c]
push edx
lea eax, [ebp - 0x618]
push eax
neg ecx
push ecx
call fcn.00418530
push eax
push str.nRetCode
mov dword [ebp - 0x92c], eax
call fcn.00401000
mov eax, dword [ebp - 0x934]
add esp, 0x1c
jmp 0x410629
mov eax, dword [esi + 0xd8]
push 0x5a44ca
push eax
call fcn.0055eddd
add esp, 8
test eax, eax
setne al
test al, al
je 0x41064e
push 0x5a44ca
lea ecx, [ebp - 0x938]
call fcn.0040a230
push 1
push 0x5a5834
lea ecx, [ebp - 0x938]
mov dword [ebp - 4], 1
call fcn.00406340
mov eax, dword [esi + 0xd8]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x938]
call fcn.00406340
mov ecx, dword [ebp - 0x938]
push ecx
push 0x5a5804
call fcn.00401000
mov edx, dword [ebp - 0x938]
mov ecx, dword [ebp - 0x92c]
push edx
lea eax, [ebp - 0x618]
push eax
neg ecx
push ecx
call fcn.00418530
mov dword [ebp - 0x92c], eax
mov eax, dword [ebp - 0x938]
add esp, 0x14
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x410678
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x410678
push 0x5a57ec
call fcn.00401000
mov edx, dword [ebp - 0x92c]
push 0
lea ecx, [ebp - 0x618]
push ecx
neg edx
push edx
call fcn.00418530
add esp, 0x10
mov dword [ebp - 0x92c], eax
cmp dword [ebp - 0x92c], 0
jne 0x4102e0
lea eax, [ebp - 0x924]
push eax
push 0x104
call dword [0x5a22c4]
push str.launch.txt
push str.Record
lea ecx, [ebp - 0x924]
push ecx
lea edx, [ebp - 0x820]
push str._s__s__s
push edx
call fcn.0055e47c
lea eax, [ebp - 0x820]
push 0x5a57e8
push eax
call fcn.0055ead8
mov edi, eax
add esp, 0x1c
test edi, edi
je 0x410732
cmp dword [esi + 0x360], 0x10
lea eax, [esi + 0x34c]
jb 0x4106e4
mov eax, dword [eax]
mov ecx, dword [esi + 0x340]
push eax
push ecx
lea edx, [ebp - 0x71c]
push str._d_n_s
push edx
call fcn.0055e47c
lea eax, [ebp - 0x71c]
add esp, 0x10
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410710
sub eax, edx
push edi
push eax
lea eax, [ebp - 0x71c]
push 1
push eax
call fcn.0055e89c
push edi
call fcn.0055e6d1
add esp, 0x14
mov edi, dword [ebp - 0x92c]
push edi
push str.CmxstartupApp::RunGame_StartProcess__d:_n
lea ecx, [ebp - 0x114]
push 0x104
push ecx
call fcn.0055e500
add esp, 0x10
lea edx, [ebp - 0x114]
push edx
call dword [0x5a229c]
jmp 0x410771
test edi, edi
je 0x41079f
cmp dword [esi + 0xc8], 0
setne al
movzx ecx, al
push ecx
call fcn.0040a600
mov edx, dword [esi + 0x20]
mov ecx, dword [edx + 0xa4]
add esp, 4
test ecx, ecx
je 0x41079f
push 5
call fcn.0046800c
xor eax, eax
test edi, edi
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0055d11a
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0x5a5730
call fcn.004690fa
mov eax, 0xfffffffa
jmp 0x4107a6