Function at 0x494670
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d8d16
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa80
push ebx
push esi
xor ebx, ebx
push edi
mov edi, ecx
or esi, 0xffffffff
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0xa8c], ebx
mov dword [ebp - 0xa84], ebx
mov dword [ebp - 0xa88], ebx
mov dword [ebp - 0xa80], esi
mov word [ebp - 0xa7c], ax
mov word [ebp - 0x978], cx
mov dword [ebp - 0x97c], ebx
xor edx, edx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x568], ebx
mov dword [ebp - 0x560], ebx
mov dword [ebp - 0x564], ebx
mov dword [ebp - 0x55c], esi
mov word [ebp - 0x558], dx
mov word [ebp - 0x454], ax
mov dword [ebp - 0x458], ebx
mov ecx, dword [edi + 4]
push ebx
push ecx
push str.ConEmuLastOutputMapping._08X
lea ecx, [ebp - 0xa8c]
mov byte [ebp - 4], 1
call fcn.00417d90
push esi
push ebx
push ebx
lea ecx, [ebp - 0xa8c]
call fcn.004824c0
cmp eax, ebx
je 0x494a11
cmp word [eax + 0x4e], bx
lea edx, [eax + 0x4e]
je 0x494a11
movsx esi, word [eax + 0x30]
movsx ecx, word [eax + 0x32]
mov eax, dword [eax + 0x46]
imul ecx, esi
mov esi, eax
cmp eax, ecx
jb 0x49474b
mov esi, ecx
push ebx
push ebx
push edx
lea ecx, [ebp - 0x568]
call fcn.00417d90
lea edx, [esi*4 + 0x56]
push edx
push ebx
push ebx
lea ecx, [ebp - 0x568]
call fcn.00482610
mov esi, eax
cmp esi, ebx
jne 0x4947a0
push ebx
push ebx
push ebx
push ebx
push str.Stored_output_data_mapping_was_not_created_
call fcn.004263e0
add esp, 0x14
lea ecx, [ebp - 0x568]
call fcn.0046bb90
lea ecx, [ebp - 0xa8c]
call fcn.0046bb90
jmp 0x494aa4
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x34]
mov edx, dword [esi + 0x38]
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x34], ecx
mov ecx, dword [esi + 0x40]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], edx
mov dx, word [esi + 0x44]
mov dword [ebp - 0x28], ecx
push eax
mov ecx, edi
mov word [ebp - 0x24], dx
call fcn.00488320
xor ecx, ecx
cmp eax, ebx
setne cl
cmp dword [esi + 4], 0x8b
mov dword [ebp + 0xc], eax
mov dword [ebp - 0x44], ecx
jne 0x4949d5
cmp dword [esi], 0x56
jbe 0x4949d5
movsx edx, word [ebp - 0x36]
movsx ebx, word [ebp - 0x38]
mov ecx, dword [esi + 0x46]
mov eax, edx
imul eax, ebx
cmp eax, ecx
jb 0x49480a
mov eax, ecx
lea edi, [esi + 0x52]
lea eax, [edi + eax*4]
mov dword [ebp - 0x3c], eax
test ebx, ebx
je 0x4949d0
test edx, edx
je 0x4949d0
cmp dword [esi + 0x4e], 0
je 0x4949d0
lea ecx, [ebx + ebx + 2]
push ecx
mov dword [ebp - 0x18], 0
call fcn.0044c4d0
xor edx, edx
mov esi, eax
add esp, 4
mov dword [ebp - 0x40], esi
mov word [esi + ebx*2], dx
cmp dword [ebp + 8], edx
jne 0x494866
lea eax, [ebx + 1]
push eax
call fcn.0044c4d0
add esp, 4
mov dword [ebp - 0x18], eax
mov byte [eax + ebx], 0
jmp 0x494883
mov eax, dword [ebp + 0xc]
push 0
lea ecx, [ebp - 0x10]
push ecx
push 2
lea edx, [ebp - 0x14]
push edx
push eax
mov dword [ebp - 0x14], 0xfeff
call dword [sym.imp.KERNEL32.dll_WriteFile]
movsx eax, word [ebp - 0x36]
mov ecx, 1
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x14], 0
test eax, eax
jbe 0x4949d0
jmp 0x4948a3
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x3c]
cmp edi, edx
jae 0x4949d0
movsx eax, word [ebp - 0x38]
lea ebx, [eax*4]
lea eax, [ebx + edi - 4]
mov dword [ebp - 0x20], ebx
cmp eax, edi
jb 0x4948d1
cmp word [eax], 0x20
jne 0x4948d1
sub eax, 4
cmp eax, edi
jae 0x4948c4
sub eax, edi
sar eax, 2
add eax, 1
jne 0x494904
test ecx, ecx
jne 0x4949bb
test eax, eax
jne 0x494919
lea ecx, [ebx + edi]
cmp ecx, edx
jae 0x4949d0
cmp word [ecx], 0x20
jne 0x494911
add ecx, 4
cmp ecx, edx
jb 0x4948f2
jmp 0x4949d0
test ecx, ecx
je 0x4948e3
mov dword [ebp - 0x1c], 0
jmp 0x494919
cmp ecx, edx
jae 0x4949d0
mov edx, edi
mov ecx, esi
test eax, eax
jbe 0x49493a
mov esi, eax
mov bx, word [edx]
mov word [ecx], bx
add ecx, 2
add edx, 4
sub esi, 1
jne 0x494923
mov esi, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x20]
cmp dword [ebp + 8], 0
je 0x494972
test eax, eax
jbe 0x494959
push 0
lea ecx, [ebp - 0x10]
push ecx
lea edx, [eax + eax]
mov eax, dword [ebp + 0xc]
push edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp + 0xc]
push 0
lea ecx, [ebp - 0x10]
push ecx
push 4
push 0x4e77f4
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4949bb
movsx ecx, word [ebp - 0x38]
mov ebx, dword [ebp - 0x18]
push 0
push 0
push ecx
push ebx
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jbe 0x4949a1
mov edx, dword [ebp + 0xc]
push 0
lea ecx, [ebp - 0x10]
push ecx
push eax
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp + 0xc]
push 0
lea eax, [ebp - 0x10]
push eax
push 2
push 0x4ffc5c
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
movsx eax, word [ebp - 0x36]
inc ecx
add edi, ebx
mov dword [ebp - 0x14], ecx
cmp ecx, eax
jb 0x4948a0
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp eax, ebx
je 0x4949e5
cmp eax, 0xffffffff
je 0x4949e5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x568]
call fcn.0046bb90
lea ecx, [ebp - 0xa8c]
call fcn.0046bb90
mov eax, dword [ebp - 0x44]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
push ebx
push ebx
push ebx
push ebx
push str.Stored_output_mapping_was_not_created_
call fcn.004263e0
mov eax, dword [ebp - 0x568]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
add esp, 0x14
cmp eax, ebx
je 0x494a7a
mov ecx, dword [ebp - 0x564]
cmp ecx, ebx
je 0x494a51
push ecx
call esi
mov eax, dword [ebp - 0x568]
mov dword [ebp - 0x564], ebx
cmp eax, ebx
je 0x494a58
push eax
call edi
mov dword [ebp - 0x568], ebx
mov dword [ebp - 0x560], ebx
mov dword [ebp - 0x564], ebx
mov dword [ebp - 0x55c], 0xffffffff
mov dword [ebp - 0x458], ebx
mov ecx, dword [ebp - 0xa8c]
cmp ecx, ebx
je 0x494aa4
mov eax, dword [ebp - 0xa88]
cmp eax, ebx
je 0x494a9d
push eax
call esi
mov ecx, dword [ebp - 0xa8c]
mov dword [ebp - 0xa88], ebx
cmp ecx, ebx
je 0x494aa4
push ecx
call edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8