Function at 0x1000f949
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x20]
xor ecx, ecx
mov cl, byte [eax + 0x12828]
test ecx, ecx
jne 0x1000f9f5
push 2
push 0
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 8]
push eax
push 1
push 4
mov ecx, dword [ebp - 0x20]
add ecx, 0xc
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 1
jae 0x1000f9bc
push str.Write_Error
mov ecx, dword [ebp - 0x20]
call fcn.1000e72d
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x10]
add eax, 4
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x10], eax
mov edx, dword [ebp - 0x20]
cmp dword [edx + 0xc], 0
jne 0x1000f9d9
jmp 0x1000fe4d
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.MSVCRT.dll_rewind]
add esp, 4
mov edx, dword [ebp - 0x20]
mov dword [edx + 0xc], 0
jmp 0x1000fa72
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x12844]
mov dword [eax + 0xc], edx
mov byte [ebp - 0x1c], 0
lea eax, [ebp - 0x1c]
push eax
push 4
mov ecx, dword [ebp - 0x20]
add ecx, 0x1282c
call fcn.100103a0
push 4
mov ecx, dword [ebp - 0x20]
add ecx, 0xc
push ecx
push 0
mov ecx, dword [ebp - 0x20]
add ecx, 0x1282c
call fcn.10010470
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x10]
add eax, 4
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x10], eax
mov edx, dword [ebp - 0x20]
cmp dword [edx + 0xc], 0
jne 0x1000fa5b
jmp 0x1000fe4d
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x12848], 0
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0xc], 0
mov ecx, dword [ebp - 0x20]
call fcn.1000ee1c
mov ecx, dword [ebp - 0x20]
call fcn.1000e923
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0xfc4
mov edx, dword [ebp - 8]
mov dword [ebp - 0x10], edx
jmp 0x1000faa1
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 4]
jge 0x1000fab5
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x10]
mov byte [edx + 0x18], 0x20
jmp 0x1000fa98
mov eax, dword [ebp - 0x20]
xor ecx, ecx
mov cl, byte [eax + 0x12828]
test ecx, ecx
jne 0x1000fb09
mov dword [ebp - 0x18], 0
jmp 0x1000fad6
mov edx, dword [ebp - 0x18]
add edx, 1
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x18], 0x3c
jge 0x1000fb07
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.MSVCRT.dll_getc]
add esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x1000fb07
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
mov cl, byte [ebp - 0xc]
mov byte [eax + edx + 0x18], cl
jmp 0x1000facd
jmp 0x1000fb76
mov dword [ebp - 0x18], 0
jmp 0x1000fb1b
mov edx, dword [ebp - 0x18]
add edx, 1
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x18], 0x3c
jge 0x1000fb76
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
mov edx, dword [eax + 0x12848]
cmp edx, dword [ecx + 0x12844]
jge 0x1000fb76
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x12840]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x12848]
xor edx, edx
mov dl, byte [ecx + eax]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x12848]
add ecx, 1
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x12848], ecx
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
mov dl, byte [ebp - 0xc]
mov byte [ecx + eax + 0x18], dl
jmp 0x1000fb12
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
mov dword [eax + 0xc], ecx
mov dword [ebp - 0x10], 1
jmp 0x1000fb91
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0x3c
jg 0x1000fba8
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x20]
call fcn.1000e98c
jmp 0x1000fb88
mov ecx, dword [ebp - 4]
push ecx
mov ecx, dword [ebp - 0x20]
call fcn.1000e98c
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x1058]
cmp eax, dword [ebp - 0x18]
jle 0x1000fbce
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x18]
mov dword [ecx + 0x1058], edx
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x1058], 2
jg 0x1000fbfd
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x1058], 1
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 4]
xor eax, eax
mov al, byte [edx + 0x18]
push eax
mov ecx, dword [ebp - 0x20]
call fcn.1000f0d3
jmp 0x1000fc2a
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x1058]
add edx, 0xfd
push edx
mov ecx, dword [ebp - 0x20]
call fcn.1000f0d3
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x1054]
sub ecx, 1
push ecx
mov ecx, dword [ebp - 0x20]
call fcn.1000f280
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x1058]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov dl, byte [ecx + 0x12828]
test edx, edx
jne 0x1000fcdc
mov dword [ebp - 0x10], 0
jmp 0x1000fc5b
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x14]
jge 0x1000fcd7
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.MSVCRT.dll_getc]
add esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x1000fcd7
mov ecx, dword [ebp - 8]
push ecx
mov ecx, dword [ebp - 0x20]
call fcn.1000ec2c
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 8]
mov al, byte [ebp - 0xc]
mov byte [edx + 0x18], al
cmp dword [ebp - 8], 0x3b
jge 0x1000fca9
mov ecx, dword [ebp - 0x20]
add ecx, dword [ebp - 8]
mov dl, byte [ebp - 0xc]
mov byte [ecx + 0x1018], dl
mov eax, dword [ebp - 8]
add eax, 1
and eax, 0xfff
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
add ecx, 1
and ecx, 0xfff
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
push edx
mov ecx, dword [ebp - 0x20]
call fcn.1000e98c
jmp 0x1000fc52
jmp 0x1000fd9d
mov dword [ebp - 0x10], 0
jmp 0x1000fcee
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x14]
jge 0x1000fd9d
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x20]
mov ecx, dword [edx + 0x12848]
cmp ecx, dword [eax + 0x12844]
jge 0x1000fd9d
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x12840]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x12848]
xor ecx, ecx
mov cl, byte [eax + edx]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x12848]
add eax, 1
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x12848], eax
mov edx, dword [ebp - 8]
push edx
mov ecx, dword [ebp - 0x20]
call fcn.1000ec2c
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 8]
mov cl, byte [ebp - 0xc]
mov byte [eax + 0x18], cl
cmp dword [ebp - 8], 0x3b
jge 0x1000fd6e
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 8]
mov al, byte [ebp - 0xc]
mov byte [edx + 0x1018], al
mov ecx, dword [ebp - 8]
add ecx, 1
and ecx, 0xfff
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 4]
add edx, 1
and edx, 0xfff
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x20]
call fcn.1000e98c
jmp 0x1000fce5
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0xc]
add edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x20]
mov dword [eax + 0xc], edx
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x20]
mov eax, dword [ecx + 0xc]
cmp eax, dword [edx + 0x14]
jbe 0x1000fde1
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0xc]
push edx
push str._12ld_r
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x14]
add ecx, 0x400
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x14], ecx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
cmp eax, ecx
jge 0x1000fe3b
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x20]
call fcn.1000ec2c
mov ecx, dword [ebp - 8]
add ecx, 1
and ecx, 0xfff
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 4]
add edx, 1
and edx, 0xfff
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x1000fe39
mov ecx, dword [ebp - 4]
push ecx
mov ecx, dword [ebp - 0x20]
call fcn.1000e98c
jmp 0x1000fde1
cmp dword [ebp - 0x18], 0
jg 0x1000fbb4
mov ecx, dword [ebp - 0x20]
call fcn.1000f411
mov esp, ebp
pop ebp
ret