Function at 0x1002a110
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10056dbe
mov eax, dword fs:[0]
push eax
sub esp, 0xa94
mov eax, dword [0x1006c740]
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 edi, ecx
cmp dword [0x1006f668], 0
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xa2c], esi
jne 0x1002a15f
mov ecx, 0x10060bb4
call fcn.1002d5f0
mov dword [edi], 0
cmp esi, 3
jne 0x1002a1c2
cmp byte [0x1009c770], 0
je 0x1002a17e
push 0x1009c758
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [0x1006d688], 0
je 0x1002a19e
mov dword [edi + 4], 0x100865c0
mov byte [0x1006d688], 0
mov byte [0x10095111], 1
jmp 0x1002a1ac
mov dword [edi + 4], 0x10070378
mov byte [0x1007eec9], 0
cmp byte [0x1009c770], 0
je 0x1002a211
push 0x1009c758
call dword [0x10059108]
jmp 0x1002a211
push 0xeb58
call fcn.10035cb1
mov esi, eax
add esp, 4
mov dword [ebp - 0xa34], esi
mov dword [ebp - 4], 0
test esi, esi
je 0x1002a1f6
sub esp, 0xc
lea eax, [esi + 4]
lea ecx, [esi + 0xea68]
push eax
call fcn.10028230
jmp 0x1002a1f8
xor esi, esi
mov dword [ebp - 4], 0xffffffff
mov dword [edi], esi
mov dword [edi + 4], esi
mov byte [esi + 0xeb51], 0
mov esi, dword [ebp - 0xa2c]
mov ecx, dword [edi + 4]
mov edx, 0x30
mov eax, dword [ecx + 0xea68]
mov eax, dword [eax + 4]
mov word [eax + ecx + 0xeaa8], dx
call fcn.1003a5f1
mov ecx, dword [edi + 4]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, dword [edi + 4]
mov ecx, dword [ebp + 0xc]
mov word [eax + 0xeb00], si
mov eax, dword [edi + 4]
mov dword [eax + 0xeb04], ecx
mov eax, dword [edi + 4]
mov dword [eax + 0xeb08], 0x1002ae80
mov eax, dword [edi + 4]
mov dword [eax + 0xeb0c], 0
mov eax, dword [edi + 4]
mov dword [eax + 0xeb0c], 0
call fcn.1002d510
mov ecx, eax
call fcn.10053e3f
mulsd xmm0, qword [0x10064350]
movsd qword [ebp - 0xa38], xmm0
call fcn.10053c9f
mov ecx, dword [edi + 4]
mov dword [ecx + 0xeb10], eax
mov dword [ecx + 0xeb14], edx
mov ecx, dword [edi + 4]
lea eax, [ecx + 0xeb10]
push eax
lea eax, [ecx + 0xeb18]
push eax
call fcn.1003d351
mov esi, dword [edi + 4]
add esp, 8
mov edx, dword [esi + 0xeb14]
mov ecx, dword [esi + 0xeb10]
call fcn.10053e3f
movsd xmm1, qword [ebp - 0xa38]
subsd xmm1, xmm0
movdqu xmm0, xmmword [esi + 0xeb18]
push 0x2f
push ebx
movdqu xmmword [0x1009c97c], xmm0
movdqu xmm0, xmmword [esi + 0xeb28]
mulsd xmm1, qword [0x10064368]
movdqu xmmword [0x1009c98c], xmm0
mov eax, dword [esi + 0xeb38]
mov dword [0x1009c99c], eax
mov eax, dword [edi + 4]
cvttsd2si ecx, xmm1
mov dword [eax + 0xeb40], 0
mov eax, dword [edi + 4]
mov dword [ebp - 0xa3c], ecx
mov dword [0x1009c9a0], ecx
mov dword [eax + 0xeb44], 0
call fcn.1004070a
add esp, 8
test eax, eax
jne 0x1002a359
push 0x5c
push ebx
call fcn.1004070a
add esp, 8
mov ecx, ebx
test eax, eax
je 0x1002a35c
lea ecx, [eax + 2]
mov eax, dword [edi + 4]
push 0x208
mov dword [eax + 0xeb48], ecx
mov eax, dword [edi + 4]
mov dword [eax + 0xeb4c], ebx
mov eax, dword [edi + 4]
mov byte [eax + 0xeb50], 0
xor eax, eax
push eax
mov word [ebp - 0x428], ax
lea eax, [ebp - 0x426]
push eax
call fcn.10037cb0
add esp, 0xc
xor eax, eax
mov word [ebp - 0x18], ax
mov dword [ebp - 0x16], eax
mov word [ebp - 0x828], ax
push 0x1fe
push eax
lea eax, [ebp - 0x826]
push eax
call fcn.10037cb0
add esp, 0xc
xor eax, eax
mov word [ebp - 0x218], ax
push 0x1fe
push eax
lea eax, [ebp - 0x216]
push eax
call fcn.10037cb0
add esp, 0xc
xor eax, eax
mov word [ebp - 0x628], ax
push 0x1fe
push eax
lea eax, [ebp - 0x626]
push eax
call fcn.10037cb0
add esp, 0xc
lea eax, [ebp - 0x428]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebx, dword [0x10059218]
test eax, eax
jne 0x1002a435
call dword [0x10059048]
mov esi, eax
call fcn.10036e52
add eax, 0x40
push eax
push 1
push esi
push str.Failed_to_get_executable_module_name___d__n
call fcn.10037858
jmp 0x1002a473
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x828]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x428]
push eax
call fcn.1003df25
add esp, 0x14
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x218]
push eax
push str._s_s
push eax
call ebx
mov esi, dword [ebp + 0xc]
add esp, 0x10
cmp byte [0x1007ef12], 0
je 0x1002a737
cmp esi, 0xffffffff
je 0x1002a737
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, dword [edi + 4]
push 0
mov dword [ebp - 0xa34], eax
lea eax, [ebp - 0xa60]
push 2
push eax
call fcn.10035815
mov edx, dword [ebp - 0xa2c]
lea ecx, [esi + 0xea68]
add esp, 0xc
mov ebx, eax
mov edx, dword [edx*4 + 0x10063c04]
mov dl, byte [edx]
call fcn.1002ce30
mov esi, eax
test esi, esi
jne 0x1002a4d7
xor ecx, ecx
jmp 0x1002a4de
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
push dword [ebx + 0xc]
mov eax, dword [ebx]
push dword [ebx + 8]
push ecx
call eax
add esp, 0xc
lea eax, [ebp - 0xa70]
push 0
push 2
push eax
call fcn.10035815
mov ecx, dword [edi + 4]
add esp, 0xc
mov ebx, eax
mov ecx, dword [ecx + 0xeb28]
inc ecx
push ecx
mov ecx, esi
call fcn.1002bf20
mov esi, eax
test esi, esi
jne 0x1002a51d
xor ecx, ecx
jmp 0x1002a524
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
push dword [ebx + 0xc]
mov eax, dword [ebx]
push dword [ebx + 8]
push ecx
call eax
add esp, 0xc
lea eax, [ebp - 0xa90]
push 0
push 2
push eax
call fcn.10035815
mov ecx, dword [edi + 4]
add esp, 0xc
mov ebx, eax
push dword [ecx + 0xeb24]
mov ecx, esi
call fcn.1002bf20
mov edx, 0x20
mov ecx, eax
call fcn.1002c550
mov esi, eax
test esi, esi
jne 0x1002a56d
xor ecx, ecx
jmp 0x1002a574
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
push dword [ebx + 0xc]
mov eax, dword [ebx]
push dword [ebx + 8]
push ecx
call eax
add esp, 0xc
lea eax, [ebp - 0xa50]
push 0
push 2
push eax
call fcn.10035815
mov ecx, dword [edi + 4]
add esp, 0xc
mov ebx, eax
push dword [ecx + 0xeb20]
mov ecx, esi
call fcn.1002bf20
mov edx, 0x3a
mov ecx, eax
call fcn.1002c550
mov esi, eax
test esi, esi
jne 0x1002a5bd
xor ecx, ecx
jmp 0x1002a5c4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
push dword [ebx + 0xc]
mov eax, dword [ebx]
push dword [ebx + 8]
push ecx
call eax
add esp, 0xc
lea eax, [ebp - 0xa80]
push 0
push 2
push eax
call fcn.10035815
mov ecx, dword [edi + 4]
add esp, 0xc
mov ebx, eax
push dword [ecx + 0xeb1c]
mov ecx, esi
call fcn.1002bf20
mov edx, 0x3a
mov ecx, eax
call fcn.1002c550
mov esi, eax
test esi, esi
jne 0x1002a60d
xor ecx, ecx
jmp 0x1002a614
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
push dword [ebx + 0xc]
mov eax, dword [ebx]
push dword [ebx + 8]
push ecx
call eax
add esp, 0xc
lea eax, [ebp - 0xaa0]
push 0
push 6
push eax
call fcn.10035815
mov ecx, dword [edi + 4]
add esp, 0xc
mov ebx, eax
push dword [ecx + 0xeb18]
mov ecx, esi
call fcn.1002bf20
mov edx, 0x10063830
mov ecx, eax
call fcn.1000a480
mov esi, eax
test esi, esi
jne 0x1002a65d
xor ecx, ecx
jmp 0x1002a664
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
push dword [ebx + 0xc]
mov eax, dword [ebx]
push dword [ebx + 8]
push ecx
call eax
add esp, 0xc
call fcn.1003d62b
push eax
push ecx
push dword [ebp - 0xa3c]
mov ecx, esi
call fcn.1002bf20
mov edx, 0x20
mov ecx, eax
call fcn.1002c550
lea edx, [ebp - 0x218]
mov ecx, eax
call fcn.1000a480
mov edx, 0x20
mov ecx, eax
call fcn.1002c550
add esp, 4
mov ecx, eax
call fcn.10008890
push dword [ebp - 0xa34]
mov esi, 0x30
mov ecx, dword [eax]
lea edx, [esi - 0x10]
mov ecx, dword [ecx + 4]
push ecx
mov word [ecx + eax + 0x40], si
mov ecx, eax
call fcn.1002c550
add esp, 4
mov ecx, eax
call fcn.10008890
mov edx, 0x20
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov word [ecx + eax + 0x40], si
mov esi, dword [edi + 4]
push dword [esi + 0xeb04]
push ecx
mov ecx, eax
call fcn.1002c550
mov edx, dword [esi + 0xeb48]
mov ecx, eax
call fcn.1000a480
mov edx, 0x3a
mov ecx, eax
call fcn.1002c550
add esp, 4
mov ecx, eax
call fcn.1002bf20
mov edx, 0x10063828
mov ecx, eax
call fcn.1000a480
mov ebx, dword [0x10059218]
mov esi, dword [ebp + 0xc]
mov edx, dword [edi + 4]
mov eax, dword [edx + 0xea8c]
mov ecx, dword [edx + 0xea7c]
mov eax, dword [eax]
sub eax, dword [ecx]
sar eax, 1
mov dword [edx + 0xeb3c], eax
cmp dword [0x1007ef24], 0
je 0x1002a776
mov eax, dword [edi + 4]
push esi
push dword [eax + 0xeb48]
lea eax, [ebp - 0xa28]
push 0x10063834
push eax
call ebx
add esp, 0x10
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.100359a8
mov esp, ebp
pop ebp
ret 0x10