Function at 0x1001fad4
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x1005494c
call fcn.10052270
sub esp, 0x14
push ebx
push edi
mov edi, ecx
xor ebx, ebx
mov ecx, dword [edi + 8]
lea eax, [edi + 4]
cmp ecx, ebx
mov dword [ebp - 0x20], eax
je 0x1001fb00
mov eax, dword [eax + 8]
sub eax, ecx
test eax, 0xfffffffc
jne 0x1001fb1c
mov eax, dword [edi + 0x18]
cmp eax, ebx
je 0x1001fca9
mov ecx, dword [edi + 0x1c]
sub ecx, eax
test ecx, 0xfffffffc
je 0x1001fca9
mov eax, dword [0x10070040]
mov dword [ebp - 0x10], eax
mov eax, dword [edi]
push ebx
push 0x80
push 4
push ebx
push 1
push 0x40000000
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
jne 0x1001fb58
or dword [ebp - 4], eax
lea ecx, [ebp - 0x10]
call fcn.1000349d
jmp 0x1001fca9
push esi
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [edi + 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [eax - 8], ebx
je 0x1001fb96
push eax
lea eax, [ebp - 0x10]
push str.__________________________s__________________________r_n
push eax
call fcn.10009c35
mov eax, dword [ebp - 0x10]
add esp, 0xc
lea edx, [ebp - 0x1c]
mov ecx, dword [eax - 8]
push ebx
push edx
push ecx
push eax
push dword [ebp - 0x18]
call esi
mov dword [ebp - 0x14], ebx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
cmp ecx, ebx
je 0x1001fbed
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x14]
sub edx, ecx
sar edx, 2
cmp eax, edx
jae 0x1001fbed
mov ecx, dword [edi + 8]
lea eax, [ecx + eax*4]
lea ecx, [ebp - 0x10]
push eax
call fcn.10003640
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx - 8]
cmp eax, ebx
je 0x1001fbe8
lea edx, [ebp - 0x1c]
push ebx
push edx
push eax
push ecx
push dword [ebp - 0x18]
call esi
lea eax, [ebp - 0x1c]
push ebx
push eax
push 2
push 0x10070f98
push dword [ebp - 0x18]
call esi
inc dword [ebp - 0x14]
jmp 0x1001fb99
mov dword [ebp - 0x14], ebx
lea ebx, [edi + 0x14]
mov eax, dword [ebx + 4]
test eax, eax
je 0x1001fc46
mov ecx, dword [ebx + 8]
sub ecx, eax
mov eax, dword [ebp - 0x14]
sar ecx, 2
cmp eax, ecx
jae 0x1001fc46
mov ecx, dword [edi + 0x18]
lea eax, [ecx + eax*4]
lea ecx, [ebp - 0x10]
push eax
call fcn.10003640
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx - 8]
test eax, eax
je 0x1001fc41
lea edx, [ebp - 0x1c]
push 0
push edx
push eax
push ecx
push dword [ebp - 0x18]
call esi
lea eax, [ebp - 0x1c]
push 0
push eax
push 2
push 0x10070f98
push dword [ebp - 0x18]
call esi
inc dword [ebp - 0x14]
jmp 0x1001fbf3
mov eax, dword [edi + 0x24]
cmp dword [eax - 8], 0
je 0x1001fc74
push eax
lea eax, [ebp - 0x10]
push str.__________________________s__________________________r_n
push eax
call fcn.10009c35
mov eax, dword [ebp - 0x10]
add esp, 0xc
lea edx, [ebp - 0x1c]
mov ecx, dword [eax - 8]
push 0
push edx
push ecx
push eax
push dword [ebp - 0x18]
call esi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 4]
push eax
push edx
call fcn.1000a202
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
push eax
push ecx
mov ecx, ebx
call fcn.1000a202
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.1000349d
pop esi
mov ecx, dword [ebp - 0xc]
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret