Function at 0x1003b13
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0x8c
push esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0
mov esi, eax
call fcn.010039de
cmp eax, 1
jne 0x1003d1e
mov eax, dword [ebp + 0x70]
cmp eax, dword [0x1009094]
jg 0x1003d1e
push ebx
push edi
push esi
push 0x10012c0
mov ebx, 0x1008090
push ebx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, ebx
add esp, 0xc
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003b62
lea ecx, [ebp + 0x80]
push ecx
push dword [ebp + 0x7c]
sub eax, esi
lea eax, [eax + 0x1008090]
push eax
call dword [sym.imp.USER32.dll_wvsprintfA]
mov edi, ebx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1003b85
mov eax, dword [0x1009090]
cmp dword [ebp + 0x78], eax
mov esi, 0x10012bc
movsw word es:[edi], word [esi]
jb 0x1003ba1
mov dword [ebp + 0x78], eax
push 0x10011e0
push 0x1009898
call dword [sym.imp.msvcrt.dll_fopen]
test eax, eax
pop ecx
pop ecx
mov dword [ebp + 0x5c], eax
je 0x1003d1c
mov eax, ebx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003bc3
push dword [ebp + 0x5c]
sub eax, esi
push eax
push 1
push ebx
call dword [sym.imp.msvcrt.dll_fwrite]
and dword [ebp + 0x64], 0
add esp, 0x10
cmp dword [ebp + 0x78], 0
jbe 0x1003d02
push dword [ebp + 0x64]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push 0x10012e0
push ebx
call edi
add esp, 0xc
xor esi, esi
mov dword [ebp + 0x60], esi
cmp esi, 8
jne 0x1003c26
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003c0d
sub eax, edx
lea eax, [eax + 0x1008090]
push 0x10012dc
push eax
call edi
pop ecx
pop ecx
mov eax, dword [ebp + 0x64]
cmp eax, dword [ebp + 0x78]
mov eax, ebx
jb 0x1003c53
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003c33
sub eax, edx
lea eax, [eax + 0x1008090]
push 0x10012d8
push eax
call edi
pop ecx
pop ecx
mov byte [ebp + esi - 0x24], 0x20
jmp 0x1003c9d
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003c56
mov ecx, dword [ebp + 0x74]
mov edx, dword [ebp + 0x64]
sub eax, esi
lea esi, [edx + ecx]
movzx ecx, byte [esi]
push ecx
lea eax, [eax + 0x1008090]
push 0x10012d0
push eax
call edi
mov al, byte [esi]
movsx ecx, al
add esp, 0xc
cmp ecx, 0x20
jl 0x1003c95
cmp ecx, 0x7e
jg 0x1003c95
mov ecx, dword [ebp + 0x60]
mov byte [ebp + ecx - 0x24], al
jmp 0x1003c9d
mov eax, dword [ebp + 0x60]
mov byte [ebp + eax - 0x24], 0x2e
mov esi, dword [ebp + 0x60]
inc esi
inc dword [ebp + 0x64]
cmp esi, 0x10
mov dword [ebp + 0x60], esi
jl 0x1003c03
and byte [ebp + esi - 0x24], 0
mov eax, ebx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003cba
lea ecx, [ebp - 0x24]
push ecx
sub eax, esi
lea eax, [eax + 0x1008090]
push 0x10012c8
push eax
call edi
mov eax, ebx
add esp, 0xc
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003cdd
push dword [ebp + 0x5c]
sub eax, esi
push eax
push 1
push ebx
call dword [sym.imp.msvcrt.dll_fwrite]
mov eax, dword [ebp + 0x78]
add esp, 0x10
cmp dword [ebp + 0x64], eax
jb 0x1003bea
push 0x10012bc
push dword [ebp + 0x5c]
call dword [sym.imp.msvcrt.dll_fprintf]
push dword [ebp + 0x5c]
call dword [sym.imp.msvcrt.dll_fclose]
add esp, 0xc
pop edi
pop ebx
pop esi
add ebp, 0x68
leave
ret