Function at 0x4190d0
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4231f9
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x424014]
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 edx, eax
mov esi, dword [ebp + 0x10]
and eax, 0x3f
mov ebx, dword [ebp + 0x18]
imul ecx, eax, 0x38
sar edx, 6
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x4c], edx
mov eax, dword [edx*4 + 0x425310]
mov dword [ebp - 0x44], ecx
mov eax, dword [ecx + eax + 0x18]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp + 0x14]
add eax, esi
mov dword [ebp - 0x50], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
cmp byte [ebx + 0x14], 0
mov dword [ebp - 0x70], eax
jne 0x419149
mov ecx, ebx
call fcn.00412350
mov esi, dword [ebp + 8]
lea eax, [ebx + 0xc]
mov dword [ebp - 0x6c], eax
mov edi, esi
mov eax, dword [eax]
mov ecx, dword [eax + 8]
xor eax, eax
stosd dword es:[edi], eax
mov dword [ebp - 0x74], ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp - 0x5c]
mov edi, eax
mov dword [ebp - 0x34], edi
cmp eax, dword [ebp - 0x50]
jae 0x419472
xor ebx, ebx
mov al, byte [edi]
mov byte [ebp - 0x2d], al
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x2c], 1
mov eax, dword [eax*4 + 0x425310]
mov dword [ebp - 0x38], eax
cmp ecx, 0xfde9
jne 0x4192c5
mov ecx, dword [ebp - 0x38]
mov eax, ebx
mov edx, dword [ebp - 0x44]
add ecx, 0x2e
add ecx, edx
cmp byte [ecx], bl
je 0x4191b4
inc eax
inc ecx
cmp eax, 5
jl 0x4191a9
mov edi, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x34]
sub edi, ecx
mov dword [ebp - 0x2c], eax
test eax, eax
jle 0x419265
mov eax, dword [ebp - 0x38]
add eax, 0x2e
add eax, edx
mov dword [ebp - 0x64], eax
movzx eax, byte [eax]
movsx eax, byte [eax + 0x424208]
inc eax
mov dword [ebp - 0x3c], eax
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 0x38], eax
cmp eax, edi
jg 0x4193f4
mov ecx, dword [ebp - 0x2c]
mov edi, ebx
mov esi, dword [ebp - 0x64]
mov al, byte [esi]
mov byte [ebp + edi - 0x18], al
inc edi
inc esi
cmp edi, ecx
jl 0x4191f6
mov edi, dword [ebp - 0x38]
test edi, edi
jle 0x419222
push edi
mov edi, dword [ebp - 0x34]
lea eax, [ebp - 0x18]
add eax, ecx
push edi
push eax
call fcn.0040d4d0
mov edx, dword [ebp - 0x44]
add esp, 0xc
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x4c]
mov edi, ebx
mov eax, dword [esi*4 + 0x425310]
add eax, edx
mov byte [eax + edi + 0x2e], bl
inc edi
cmp edi, ecx
jl 0x419227
push dword [ebp - 0x48]
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x18]
mov edi, dword [ebp - 0x34]
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x68], eax
xor eax, eax
cmp dword [ebp - 0x3c], 4
push ecx
sete al
mov dword [ebp - 0x7c], ebx
inc eax
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x2c], eax
push eax
lea eax, [ebp - 0x68]
jmp 0x4192a4
movzx eax, byte [ecx]
movsx ecx, byte [eax + 0x424208]
inc ecx
mov dword [ebp - 0x38], ecx
cmp ecx, edi
jg 0x419422
push dword [ebp - 0x48]
mov edi, dword [ebp - 0x34]
xor eax, eax
cmp ecx, 4
mov dword [ebp - 0x84], ebx
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x80], ebx
sete al
mov dword [ebp - 0x3c], edi
inc eax
push ecx
mov dword [ebp - 0x2c], eax
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.0041f292
add esp, 0x14
cmp eax, 0xffffffff
je 0x419472
mov eax, dword [ebp - 0x38]
dec eax
add edi, eax
jmp 0x41934e
mov ecx, dword [ebp - 0x44]
mov dl, byte [ecx + eax + 0x2d]
test dl, 4
je 0x4192f2
mov al, byte [ecx + eax + 0x2e]
and dl, 0xfb
push dword [ebp - 0x48]
mov byte [ebp - 0x20], al
mov al, byte [edi]
mov byte [ebp - 0x1f], al
mov eax, dword [ebp - 0x38]
push 2
mov byte [ecx + eax + 0x2d], dl
lea eax, [ebp - 0x20]
push eax
jmp 0x419339
push dword [ebp - 0x6c]
movsx eax, byte [edi]
push eax
call fcn.0041f1e9
pop ecx
pop ecx
test eax, eax
je 0x419333
lea eax, [edi + 1]
mov dword [ebp - 0x3c], eax
cmp eax, dword [ebp - 0x50]
jae 0x419446
push dword [ebp - 0x48]
lea eax, [ebp - 0x40]
push 2
push edi
push eax
call fcn.00417f22
add esp, 0x10
cmp eax, 0xffffffff
je 0x419472
mov edi, dword [ebp - 0x3c]
jmp 0x41934e
push dword [ebp - 0x48]
push 1
push edi
lea eax, [ebp - 0x40]
push eax
call fcn.00417f22
add esp, 0x10
cmp eax, 0xffffffff
je 0x419472
push ebx
push ebx
push 5
lea eax, [ebp - 0x28]
inc edi
push eax
push dword [ebp - 0x2c]
lea eax, [ebp - 0x40]
mov dword [ebp - 0x34], edi
push eax
push ebx
push dword [ebp - 0x70]
call fcn.0041b382
add esp, 0x20
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x419472
push ebx
lea ecx, [ebp - 0x58]
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41946a
mov eax, edi
sub eax, dword [ebp - 0x5c]
add eax, dword [esi + 8]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x58], eax
jb 0x419472
cmp byte [ebp - 0x2d], 0xa
jne 0x4193e3
push 0xd
pop eax
push ebx
mov word [ebp - 0x54], ax
lea eax, [ebp - 0x58]
push eax
push 1
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41946a
cmp dword [ebp - 0x58], 1
jb 0x419472
inc dword [esi + 8]
inc dword [esi + 4]
cmp edi, dword [ebp - 0x50]
jae 0x419472
mov ecx, dword [ebp - 0x74]
jmp 0x419174
test edi, edi
jle 0x41941d
mov esi, dword [ebp - 0x2c]
mov eax, edx
mov edx, dword [ebp - 0x4c]
mov cl, byte [ebx + ecx]
mov edx, dword [edx*4 + 0x425310]
add edx, eax
add edx, ebx
inc ebx
mov byte [edx + esi + 0x2e], cl
mov ecx, dword [ebp - 0x34]
cmp ebx, edi
jl 0x4193fd
mov esi, dword [ebp + 8]
add dword [esi + 4], edi
jmp 0x419472
test edi, edi
jle 0x41941d
mov edx, dword [ebp - 0x34]
mov esi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x4c]
mov ecx, dword [eax*4 + 0x425310]
mov al, byte [ebx + edx]
add ecx, esi
mov byte [ecx + ebx + 0x2e], al
inc ebx
cmp ebx, edi
jl 0x41942c
jmp 0x41941a
mov ebx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x44]
mov al, byte [edi]
mov ecx, dword [ebx*4 + 0x425310]
mov byte [edx + ecx + 0x2e], al
mov eax, dword [ebx*4 + 0x425310]
or byte [edx + eax + 0x2d], 4
inc dword [esi + 4]
jmp 0x419472
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov eax, esi
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.0040ae78
leave
ret