Function at 0x1007263
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1020
call fcn.01009710
mov eax, dword [0x100c5f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
lea edx, [eax + 0x40]
mov dword [ebp - 0x1020], ecx
mov dword [ebp - 0x101c], esi
mov dword [ebp - 0x1018], edi
mov dword [ebp - 0x1008], ebx
cmp ecx, edx
jne 0x100730f
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push edi
push esi
push 0x7ff
mov dword [ebp - 0x1010], eax
lea eax, [ebp - 0x1004]
push 0x800
push eax
call sub.msvcrt.dll__vsnwprintf_s
add esp, 0x14
test eax, eax
jge 0x100734e
push 0x100c630
xor ecx, ecx
push 2
mov esi, 0x1000
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.01009431
pop ecx
pop ecx
mov dword [ebp - 0x100c], eax
cmp eax, ebx
jne 0x100732b
push 8
pop esi
jmp 0x1007487
add eax, 0x20
cmp ecx, eax
jne 0x100731a
push 0xfffffffffffffff5
jmp 0x10072b0
mov eax, dword [0x100c618]
cmp eax, ebx
jne 0x10072b6
push 0x57
pop eax
jmp 0x10074e8
push edi
push dword [ebp - 0x101c]
push 0xfff
push esi
push eax
call sub.msvcrt.dll__vsnwprintf_s
add esp, 0x14
cmp eax, ebx
jge 0x100735a
cmp eax, 0xffffffff
je 0x100735a
push 0x7a
jmp 0x1007309
lea eax, [ebp - 0x1004]
mov dword [ebp - 0x100c], eax
mov eax, dword [ebp - 0x100c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1007363
mov ecx, dword [ebp - 0x1010]
sub eax, edx
sar eax, 1
mov dword [ebp - 0x1014], eax
push ebx
cmp ecx, dword [0x100c618]
je 0x10073a0
lea edx, [ebp - 0x1014]
push edx
push eax
push dword [ebp - 0x100c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x1007473
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push ebx
push ebx
push eax
push dword [ebp - 0x100c]
push ebx
push ebx
call edi
mov esi, eax
cmp esi, ebx
je 0x1007477
mov dword [ebp - 0x1008], ebx
cmp esi, dword [0x100c998]
ja 0x1007406
mov eax, dword [0x100c99c]
lea eax, [eax + esi + 8]
cmp eax, esi
jb 0x1007406
push eax
call fcn.01009e78
test eax, eax
je 0x1007406
lea eax, [esi + 8]
call fcn.010096d0
mov dword [ebp - 0x1008], esp
cmp esp, ebx
je 0x1007406
add dword [ebp - 0x1008], 8
mov eax, esp
mov dword [eax], 0x6b637453
jne 0x100743b
lea eax, [esi + 8]
cmp eax, esi
jb 0x100742f
push eax
call dword [0x100c9a0]
mov dword [ebp - 0x1008], eax
cmp eax, ebx
je 0x1007307
add dword [ebp - 0x1008], 8
mov dword [eax], 0x70616548
cmp dword [ebp - 0x1008], ebx
je 0x1007307
push ebx
push ebx
push esi
push dword [ebp - 0x1008]
push dword [ebp - 0x1014]
push dword [ebp - 0x100c]
push ebx
push ebx
call edi
cmp eax, ebx
je 0x1007477
push ebx
lea ecx, [ebp - 0x1014]
push ecx
push eax
push dword [ebp - 0x1008]
push dword [ebp - 0x1010]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1007481
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x1007483
xor esi, esi
cmp esi, ebx
je 0x10074a8
push dword [ebp - 0x1018]
push dword [ebp - 0x101c]
push dword [ebp - 0x1020]
call dword [sym.imp.msvcrt.dll_vfwprintf]
add esp, 0xc
test eax, eax
jle 0x10074a8
xor esi, esi
mov eax, dword [ebp - 0x1008]
cmp eax, ebx
je 0x10074c4
add eax, 0xfffffff8
cmp dword [eax], 0x70616548
jne 0x10074c4
push eax
call dword [0x100c9a4]
cmp dword [ebp - 0x100c], ebx
je 0x10074e6
lea eax, [ebp - 0x1004]
cmp dword [ebp - 0x100c], eax
je 0x10074e6
push dword [ebp - 0x100c]
call fcn.0100909f
pop ecx
mov eax, esi
lea esp, [ebp - 0x102c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.010093d4
leave
ret