Function at 0x100a21fa
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100bfdb9
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x100cfa9c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov ecx, eax
mov edx, dword [ebp + 0x10]
and eax, 0x3f
mov ebx, dword [ebp + 0x18]
imul esi, eax, 0x38
sar ecx, 6
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x4c], ecx
mov eax, dword [ecx*4 + 0x100cfdd8]
mov dword [ebp - 0x54], esi
mov eax, dword [esi + eax + 0x18]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0x14]
add eax, edx
mov dword [ebp - 0x50], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
cmp byte [ebx + 0x14], 0
mov dword [ebp - 0x78], eax
jne 0x100a2273
mov ecx, ebx
call fcn.100950b0
mov eax, dword [ebx + 0xc]
mov ebx, dword [ebp + 8]
mov edi, ebx
mov ecx, dword [eax + 8]
xor eax, eax
stosd dword es:[edi], eax
mov dword [ebp - 0x7c], ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp - 0x64]
mov edi, eax
mov dword [ebp - 0x44], edi
cmp eax, dword [ebp - 0x50]
jae 0x100a25b7
xor edx, edx
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x2c], edx
mov al, byte [edi]
mov byte [ebp - 0x2d], al
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x34], 1
cmp ecx, 0xfde9
jne 0x100a23e6
mov eax, dword [eax*4 + 0x100cfdd8]
mov ecx, edx
add eax, 0x2e
add eax, esi
mov dword [ebp - 0x2c], eax
cmp byte [eax], 0
je 0x100a22da
inc ecx
inc eax
cmp ecx, 5
jl 0x100a22ce
mov esi, dword [ebp - 0x50]
sub esi, edi
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x6c], esi
test ecx, ecx
jle 0x100a238c
mov eax, dword [ebp - 0x2c]
movzx eax, byte [eax]
movsx eax, byte [eax + 0x100cf980]
inc eax
mov dword [ebp - 0x38], eax
sub eax, ecx
mov dword [ebp - 0x58], eax
cmp eax, esi
jg 0x100a2529
mov esi, edx
mov edx, dword [ebp - 0x2c]
mov al, byte [edx]
mov byte [ebp + esi - 0x18], al
inc esi
inc edx
cmp esi, ecx
jl 0x100a2310
mov ebx, dword [ebp - 0x58]
xor edx, edx
test ebx, ebx
jle 0x100a2337
push ebx
lea eax, [ebp - 0x18]
add eax, ecx
push edi
push eax
call fcn.100a87e0
add esp, 0xc
xor edx, edx
mov esi, dword [ebp - 0x34]
mov edi, edx
mov ebx, dword [ebp - 0x54]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x4c]
lea ecx, [ebx + edi]
inc edi
mov eax, dword [eax*4 + 0x100cfdd8]
mov byte [ecx + eax + 0x2e], dl
cmp edi, esi
jl 0x100a2342
push dword [ebp - 0x3c]
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x18]
mov edi, dword [ebp - 0x44]
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x74], eax
xorps xmm0, xmm0
xor eax, eax
movlpd qword [ebp - 0x84], xmm0
cmp dword [ebp - 0x38], 4
push ecx
sete al
inc eax
mov dword [ebp - 0x34], eax
push eax
lea eax, [ebp - 0x74]
jmp 0x100a23c4
movzx eax, byte [edi]
movsx eax, byte [eax + 0x100cf980]
inc eax
mov dword [ebp - 0x58], eax
cmp eax, esi
jg 0x100a2564
push dword [ebp - 0x3c]
xor ecx, ecx
mov dword [ebp - 0x38], edi
cmp eax, 4
xorps xmm0, xmm0
lea eax, [ebp - 0x70]
movlpd qword [ebp - 0x70], xmm0
sete cl
inc ecx
push eax
mov dword [ebp - 0x34], ecx
lea eax, [ebp - 0x38]
push ecx
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.1009efd0
add esp, 0x14
cmp eax, 0xffffffff
je 0x100a25b7
add edi, dword [ebp - 0x58]
mov esi, dword [ebp - 0x54]
dec edi
jmp 0x100a2472
mov ecx, dword [eax*4 + 0x100cfdd8]
mov dword [ebp - 0x6c], ecx
mov ah, byte [esi + ecx + 0x2d]
test ah, 4
je 0x100a2417
mov al, byte [esi + ecx + 0x2e]
and ah, 0xfb
push dword [ebp - 0x3c]
mov byte [ebp - 0x20], al
mov al, byte [edi]
mov byte [ebp - 0x1f], al
mov byte [esi + ecx + 0x2d], ah
lea eax, [ebp - 0x20]
push 2
push eax
jmp 0x100a245d
mov eax, dword [ebp - 0x3c]
movzx ecx, byte [edi]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
cmp word [eax + ecx*2], dx
jge 0x100a2457
lea eax, [edi + 1]
mov dword [ebp - 0x38], eax
cmp eax, dword [ebp - 0x50]
jae 0x100a258e
push dword [ebp - 0x3c]
lea eax, [ebp - 0x40]
push 2
push edi
push eax
call fcn.1009854b
add esp, 0x10
cmp eax, 0xffffffff
je 0x100a25b7
mov edi, dword [ebp - 0x38]
jmp 0x100a2472
push dword [ebp - 0x3c]
push 1
push edi
lea eax, [ebp - 0x40]
push eax
call fcn.1009854b
add esp, 0x10
cmp eax, 0xffffffff
je 0x100a25b7
inc edi
lea eax, [ebp - 0x28]
mov dword [ebp - 0x44], edi
xor edi, edi
push edi
push edi
push 5
push eax
push dword [ebp - 0x34]
lea eax, [ebp - 0x40]
push eax
push edi
push dword [ebp - 0x78]
call fcn.1009ee4c
add esp, 0x20
mov dword [ebp - 0x38], eax
test eax, eax
je 0x100a25b7
push edi
lea ecx, [ebp - 0x60]
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100a25af
mov eax, dword [ebx + 8]
sub eax, dword [ebp - 0x64]
add eax, dword [ebp - 0x44]
mov dword [ebp - 0x2c], eax
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x38]
cmp dword [ebp - 0x60], eax
jb 0x100a25b7
cmp byte [ebp - 0x2d], 0xa
jne 0x100a2513
push 0xd
pop eax
push edi
mov word [ebp - 0x5c], ax
lea eax, [ebp - 0x60]
push eax
push 1
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100a25af
cmp dword [ebp - 0x60], 1
jb 0x100a25b7
inc dword [ebx + 8]
inc dword [ebx + 4]
mov eax, dword [ebx + 4]
mov dword [ebp - 0x2c], eax
mov edi, dword [ebp - 0x44]
cmp edi, dword [ebp - 0x50]
jae 0x100a25b7
mov ecx, dword [ebp - 0x7c]
xor edx, edx
jmp 0x100a229f
test esi, esi
jle 0x100a255f
mov eax, dword [ebp - 0x44]
mov ebx, dword [ebp - 0x54]
mov edi, dword [ebp - 0x48]
lea esi, [ebx + edx]
add esi, ecx
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ecx*4 + 0x100cfdd8]
mov cl, byte [edi + eax]
mov byte [esi + edx + 0x2e], cl
mov edx, edi
mov esi, dword [ebp - 0x6c]
inc edx
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x48], edx
cmp edx, esi
jl 0x100a2533
mov ebx, dword [ebp + 8]
add dword [ebx + 4], esi
jmp 0x100a25b7
test esi, esi
jle 0x100a255f
mov ebx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x48]
add edx, dword [ebp - 0x54]
mov ecx, dword [eax*4 + 0x100cfdd8]
mov al, byte [edi + ebx]
mov byte [edx + ecx + 0x2e], al
mov edx, edi
inc edx
mov dword [ebp - 0x48], edx
cmp edx, esi
jl 0x100a256b
jmp 0x100a255c
mov eax, dword [ebp - 0x6c]
mov cl, byte [edi]
mov byte [esi + eax + 0x2e], cl
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax*4 + 0x100cfdd8]
or byte [esi + eax + 0x2d], 4
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebx + 4], eax
jmp 0x100a25b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx], eax
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100a6b85
leave
ret