Function at 0x10491bd
Capabilities:
Write file on windows

Disassembly:
push 0x60
mov eax, 0x106092f
call fcn.0104f320
mov esi, ecx
push dword [ebp + 8]
and dword [ebp - 0x28], 0
and dword [ebp - 0x20], 0
lea edi, [esi + 4]
mov ecx, edi
call fcn.010411fe
mov eax, dword [eax]
mov ecx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
push dword [ebp + 8]
mov dword [ebp - 0x44], ecx
mov ecx, edi
mov dword [ebp - 0x40], eax
call fcn.010411fe
mov eax, dword [eax]
mov ecx, dword [eax + 0x10]
mov ebx, dword [eax + 0x14]
push dword [ebp + 8]
mov dword [ebp - 0x4c], ecx
mov ecx, edi
mov dword [ebp - 0x48], ebx
call fcn.010411fe
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
and dword [ebp - 0x1c], 0
and dword [ebp - 0x2c], 0
and dword [ebp - 4], 0
mov dword [ebp - 0x6c], ecx
push 0x1068adc
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], ebx
call fcn.010309e3
mov eax, dword [esi + 0x1c]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 0x34]
push ecx
push dword [ebp - 0x6c]
mov byte [ebp - 4], 1
push eax
call ebx
cmp eax, 0xffffffff
jne 0x10492ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x10492ab
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jle 0x1049278
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x1049286
mov dword [ebp - 0x14], 0x80004005
push 0x1014704
push 0x10146dc
call esi
push eax
call fcn.0104a5f6
add esp, 0xc
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.010303ce
jmp 0x104972d
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
mov ecx, esi
call fcn.01048f7e
push dword [ebp + 8]
mov dword [ebp - 0x14], eax
test eax, eax
jge 0x10492da
push 0x1014680
push 0x1014654
push dword [ebp - 0x14]
call fcn.0104a504
add esp, 0x10
jmp 0x104929b
mov ecx, edi
call fcn.010411fe
mov eax, dword [eax]
mov eax, dword [eax]
mov ecx, dword [esi]
push eax
push ecx
push dword [ebp - 0x18]
push 0x10145f0
push 0x4000000
call fcn.0104a881
add esp, 0x14
xor edi, edi
push edi
lea eax, [ebp - 0x18]
push eax
call fcn.0104347e
cmp eax, edi
mov dword [ebp - 0x14], eax
jge 0x1049320
push dword [ebp - 0x18]
push 0x10145bc
push 0x1014594
jmp 0x10492cd
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp eax, edi
je 0x10496d4
cmp eax, 0xffffffff
je 0x10496d4
push edi
lea ecx, [ebp - 0x38]
push ecx
push dword [ebp - 0x4c]
push eax
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xffffffff
jne 0x1049397
call edi
test eax, eax
je 0x1049397
call edi
test eax, eax
jle 0x1049378
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x1049386
mov dword [ebp - 0x14], 0x80004005
push 0x1014704
push 0x101456c
call edi
jmp 0x1049704
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x10493ce
call edi
test eax, eax
jle 0x10493b4
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x10493c2
mov dword [ebp - 0x14], 0x80004005
push 0x10144e0
push 0x10144b8
jmp 0x1049390
xor eax, eax
push eax
push eax
push eax
push dword [ebp - 0x1c]
call ebx
cmp eax, 0xffffffff
jne 0x104940d
call edi
test eax, eax
je 0x104940d
call edi
test eax, eax
jle 0x10493f3
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x1049401
mov dword [ebp - 0x14], 0x80004005
push 0x1014458
push 0x1014430
jmp 0x1049390
mov ebx, 0x80000000
mov edi, dword [esi + 0x14]
xor eax, eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x40], eax
ja 0x1049429
jb 0x1049426
cmp dword [ebp - 0x44], edi
jae 0x1049429
mov edi, dword [ebp - 0x44]
cmp dword [ebp - 0x24], 0
jbe 0x104943a
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esi + 0x1c]
push 0
lea ecx, [ebp - 0x28]
push ecx
push edi
push dword [esi + 0x20]
push eax
call fcn.01048eb1
test eax, eax
jne 0x104948f
mov eax, dword [ebp - 0x24]
inc dword [ebp - 0x24]
cmp eax, 2
jb 0x1049429
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jle 0x1049472
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x1049480
mov dword [ebp - 0x14], 0x80004005
push 0x10143f4
push 0x10143cc
jmp 0x1049702
mov edi, dword [ebp - 0x28]
test edi, edi
jne 0x10494c5
push dword [ebp + 8]
mov edi, 0x8000ffff
lea ecx, [esi + 4]
mov dword [ebp - 0x14], edi
call fcn.010411fe
mov eax, dword [eax]
push dword [eax]
push 0x1014360
push 0x1014334
push edi
call fcn.0104a504
add esp, 0x10
jmp 0x104970d
push edi
push dword [esi + 0x20]
push dword [ebp - 0x2c]
call fcn.0104daa5
sub dword [ebp - 0x44], edi
push 0
pop edi
sbb dword [ebp - 0x40], edi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x20], edi
mov ecx, dword [ebp - 0x28]
cmp dword [ebp - 0x20], ecx
jae 0x104955f
mov eax, dword [esi + 0x20]
push 0
lea edx, [ebp - 0x20]
push edx
sub ecx, edi
push ecx
add eax, edi
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1049537
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jle 0x104951a
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x1049528
mov dword [ebp - 0x14], 0x80004005
push 0x10142f4
push 0x10142cc
jmp 0x1049702
cmp dword [ebp - 0x20], 0
jne 0x104955a
push 0x1014230
mov edi, 0x8000ffff
push 0x1014208
push edi
mov dword [ebp - 0x14], edi
call fcn.0104a504
jmp 0x104970a
add edi, dword [ebp - 0x20]
jmp 0x10494e0
cmp dword [ebp + 0x18], 0
je 0x1049684
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x48]
xor edi, edi
mov ecx, edx
sub ecx, dword [ebp - 0x44]
mov dword [ebp - 0x54], edi
sbb eax, dword [ebp - 0x40]
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x50], eax
and dword [ebp - 0x50], ebx
mov ecx, 0x7fffffff
and eax, ecx
mov dword [ebp - 0x60], eax
fild qword [ebp - 0x64]
mov eax, dword [ebp - 0x48]
fild qword [ebp - 0x54]
mov dword [ebp - 0x58], eax
and dword [ebp - 0x58], ebx
and eax, ecx
fchs
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0x10]
faddp st(1)
sub eax, dword [ebp + 0xc]
mov dword [ebp - 0x6c], edx
fild qword [ebp - 0x6c]
mov dword [ebp - 0x5c], edi
fild qword [ebp - 0x5c]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x24], edi
fchs
faddp st(1)
fdivp st(1)
fild dword [ebp - 0x30]
test eax, eax
jge 0x10495d2
fadd qword [0x1005298]
fmulp st(1)
call sub.msvcrt.dll__ftol2
push dword [ebp + 8]
mov edi, eax
add edi, dword [ebp + 0xc]
lea ecx, [esi + 4]
mov dword [ebp - 0x30], ecx
call fcn.010411fe
mov eax, dword [eax]
mov eax, dword [eax]
lea ecx, [ebp - 0x24]
push ecx
push dword [ebp + 0x14]
push edi
push eax
push dword [ebp + 0x1c]
call dword [ebp + 0x18]
mov eax, dword [ebp - 0x24]
dec eax
je 0x1049684
dec eax
je 0x1049652
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jle 0x104961e
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x104962c
mov dword [ebp - 0x14], 0x80004005
push dword [ebp + 8]
mov ecx, dword [ebp - 0x30]
call fcn.010411fe
mov eax, dword [eax]
push dword [eax]
push 0x10141cc
push 0x10141a4
call esi
push eax
call fcn.0104a5f6
jmp 0x10494bd
push dword [ebp + 8]
mov ecx, dword [ebp - 0x30]
call fcn.010411fe
mov eax, dword [eax]
push dword [eax]
push 0x1014158
push 0x101412c
push 0x4c7
call fcn.0104a6e8
add esp, 0x10
mov dword [ebp - 0x14], 0x800704c7
jmp 0x104970d
mov eax, dword [ebp - 0x44]
or eax, dword [ebp - 0x40]
jne 0x1049412
push dword [ebp + 8]
add esi, 4
mov ecx, esi
call fcn.010411fe
mov eax, dword [eax]
mov edi, dword [ebp - 0x2c]
cmp edi, dword [eax + 0x18]
je 0x104970d
push dword [ebp + 8]
mov ecx, esi
call fcn.010411fe
mov eax, dword [eax]
push dword [eax + 0x18]
push edi
push 0x10140a8
push 0x101407c
push 0xd
call fcn.0104a6e8
add esp, 0x14
mov dword [ebp - 0x14], 0x8007000d
jmp 0x104970d
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, edi
jle 0x10496ea
and eax, 0xffff
or eax, 0x80070000
cmp eax, edi
mov dword [ebp - 0x14], eax
jl 0x10496f8
mov dword [ebp - 0x14], 0x80004005
push 0x1014020
push 0x1013ff8
call esi
push eax
call fcn.0104a5f6
add esp, 0xc
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.010303ce
cmp dword [ebp - 0x1c], 0
je 0x104972d
cmp dword [ebp - 0x1c], 0xffffffff
je 0x104972d
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
call fcn.0104f3d4
ret 0x18