Function at 0x10012510
Capabilities:
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005f7ab
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x698
mov eax, dword [0x1007d00c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebx + 0xc]
mov esi, 4
mov ecx, dword [ebx + 8]
cmp eax, 5
push 0x208
cmovb esi, eax
mov dword [ebp - 0x6a0], ecx
mov ecx, dword [ebx + 0x10]
lea eax, [ebp - 0x250]
push 0
push eax
mov dword [ebp - 0x6a4], ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebx + 0x1c]
push eax
push ecx
push dword [ebx + 0x18]
push ecx
lea ecx, [ebp - 0x250]
call fcn.100012c0
lea ecx, [ebp - 0x250]
add esp, 0x10
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100125a7
sub ecx, edx
sar ecx, 1
cmp ecx, 2
jb 0x100125ec
cmp word [ebp + ecx*2 - 0x252], 0xa
jne 0x100125ec
sub ecx, 2
add ecx, ecx
cmp word [ebp + ecx - 0x250], 0xd
jne 0x100125ec
cmp ecx, 0x208
jae 0x10012a2f
xor eax, eax
mov word [ebp + ecx - 0x250], ax
push 0x400
lea eax, [ebp - 0x650]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x680]
xor edi, edi
push 0x1001d220
push 0x1001d280
push 2
push 0x18
push eax
call fcn.1005d277
lea eax, [ebp - 0x690]
mov dword [ebp - 4], edi
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x690], xmm0
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0x30
lea eax, [ebp - 0x44]
push edi
push eax
call sub.VCRUNTIME140.dll_memset
movzx eax, word [ebp - 0x68a]
add esp, 0xc
push eax
movzx eax, word [ebp - 0x68e]
push eax
movzx eax, word [ebp - 0x690]
push eax
lea eax, [ebp - 0x44]
push str._4d__02d__02d
push eax
call fcn.10029420
lea ecx, [ebp - 0x44]
add esp, 0x14
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10012676
sub ecx, edx
lea eax, [ebp - 0x44]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x680]
call fcn.10020f80
movzx eax, word [ebp - 0x682]
push eax
movzx eax, word [ebp - 0x684]
push eax
movzx eax, word [ebp - 0x686]
push eax
movzx eax, word [ebp - 0x688]
push eax
lea eax, [ebp - 0x44]
push str._02d:_02d:_02d:_03d
push eax
call fcn.10029420
lea ecx, [ebp - 0x44]
add esp, 0x18
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100126d0
sub ecx, edx
lea eax, [ebp - 0x44]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x668]
call fcn.10020f80
cmp esi, 4
ja case.default.0x100126f8
jmp dword [esi*4 + 0x10012a34]
mov dword [ebp - 0x688], str.INFO
mov dword [ebp - 0x684], str.DEBUG
mov dword [ebp - 0x694], str.FATAL
mov dword [ebp - 0x690], str.ERROR
mov dword [ebp - 0x68c], str.WARN
mov edx, dword [ebp + esi*4 - 0x694]
mov ecx, edx
mov dword [ebp - 0x698], 0
mov dword [ebp - 0x688], 0
mov dword [ebp - 0x684], 7
lea esi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10012760
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x698]
call fcn.10020f80
cmp dword [ebp - 0x684], 8
lea eax, [ebp - 0x698]
lea edi, [ebp - 0x668]
cmovae eax, dword [ebp - 0x698]
lea esi, [ebp - 0x680]
cmp dword [ebp - 0x654], 8
mov dword [ebp - 0x69c], eax
lea eax, [ebp - 0x250]
cmovae edi, dword [ebp - 0x668]
cmp dword [ebp - 0x66c], 8
push eax
push dword [ebx + 0x14]
cmovae esi, dword [ebp - 0x680]
push dword [ebp - 0x6a4]
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
push dword [ebp - 0x69c]
lea eax, [ebp - 0x650]
push edi
push esi
push str._s__s__s__s___d___s_r_n
push 0x200
push eax
call fcn.10001330
add esp, 0x24
mov ecx, dword [ebp - 0x684]
mov edi, eax
cmp ecx, 8
jb case.default.0x100126f8
mov edx, dword [ebp - 0x698]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10012990
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10012990
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov dword [ebp - 0x688], str.INFO
mov dword [ebp - 0x684], str.DEBUG
mov dword [ebp - 0x694], str.FATAL
mov dword [ebp - 0x690], str.ERROR
mov dword [ebp - 0x68c], str.WARN
mov edx, dword [ebp + esi*4 - 0x694]
mov ecx, edx
mov dword [ebp - 0x698], 0
mov dword [ebp - 0x688], 0
mov dword [ebp - 0x684], 7
lea esi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100128a0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x698]
call fcn.10020f80
cmp dword [ebp - 0x684], 8
lea edx, [ebp - 0x698]
lea ecx, [ebp - 0x668]
cmovae edx, dword [ebp - 0x698]
lea esi, [ebp - 0x250]
cmp dword [ebp - 0x654], 8
lea eax, [ebp - 0x680]
push esi
cmovae ecx, dword [ebp - 0x668]
cmp dword [ebp - 0x66c], 8
push edx
cmovae eax, dword [ebp - 0x680]
push ecx
push eax
push str._s__s__s___s_r_n
lea eax, [ebp - 0x650]
push 0x200
push eax
call fcn.10001330
add esp, 0x1c
jmp 0x100127f6
mov dword [ebp - 0x688], str.INFO
mov dword [ebp - 0x684], str.DEBUG
mov dword [ebp - 0x694], str.FATAL
mov dword [ebp - 0x690], str.ERROR
mov dword [ebp - 0x68c], str.WARN
mov edx, dword [ebp + esi*4 - 0x694]
mov ecx, edx
mov dword [ebp - 0x698], 0
mov dword [ebp - 0x688], 0
mov dword [ebp - 0x684], 7
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10012980
jmp 0x100128ab
push ecx
push edx
call fcn.1005ce33
add esp, 8
mov esi, dword [ebp - 0x6a0]
mov esi, dword [esi + 0x48]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x100129f5
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x69c]
mov dword [ebp - 0x69c], 0
push eax
lea eax, [edi + edi]
push eax
lea eax, [ebp - 0x650]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [ebp - 0x6a0]
mov eax, dword [esi + 0x48]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, esi
call fcn.10012a50
push 0x1001d220
push 2
push 0x18
lea eax, [ebp - 0x680]
mov dword [ebp - 4], 0xffffffff
push eax
call fcn.1005ca04
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1005c9d3
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.1005cf63
jmp dword [esi]