Function at 0x458b50
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1af0
call fcn.00460dd0
mov eax, dword [0x54921c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x10]
xor ebx, ebx
push edi
mov dword [ebp - 0x1ac0], eax
mov dword [ebp - 0x1abc], ecx
mov edi, ebx
mov dword [ebp - 0x1adc], ebx
test esi, esi
jne 0x458b96
xor eax, eax
jmp 0x459364
test ecx, ecx
jne 0x458bc1
call fcn.00454181
mov dword [eax], ebx
call fcn.00454169
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [eax], 0x16
call fcn.00457682
add esp, 0x14
or eax, 0xffffffff
jmp 0x459364
mov ecx, eax
and ecx, 0x1f
imul ecx, ecx, 0x24
mov edx, eax
sar edx, 5
mov dword [ebp - 0x1ad4], edx
mov edx, dword [edx*4 + 0x56ab20]
mov ebx, dword [ecx + edx + 8]
and ebx, 3
mov dword [ebp - 0x1ad8], ecx
cmp ebx, 2
je 0x458bf2
cmp ebx, 1
jne 0x458c09
mov eax, esi
not eax
test al, 1
jne 0x458c03
call fcn.00454181
xor ebx, ebx
jmp 0x458b9f
mov eax, dword [ebp - 0x1ac0]
test byte [ecx + edx + 4], 0x20
je 0x458c1f
push 2
push 0
push 0
push eax
call fcn.00460104
add esp, 0x10
push dword [ebp - 0x1ac0]
call fcn.00460c9c
pop ecx
test eax, eax
je 0x458f09
mov eax, dword [ebp - 0x1ad4]
mov eax, dword [eax*4 + 0x56ab20]
mov ecx, dword [ebp - 0x1ad8]
test byte [ecx + eax + 4], 0x80
je 0x458f09
call fcn.004560e8
mov eax, dword [eax + 0x6c]
xor ecx, ecx
cmp dword [eax + 0x14], ecx
lea eax, [ebp - 0x1ae4]
sete cl
push eax
mov eax, dword [ebp - 0x1ad4]
mov eax, dword [eax*4 + 0x56ab20]
mov dword [ebp - 0x1ac0], ecx
mov ecx, dword [ebp - 0x1ad8]
push dword [ecx + eax]
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x458f09
cmp dword [ebp - 0x1ac0], edi
je 0x458ca2
test ebx, ebx
je 0x458f09
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
mov edx, dword [ebp - 0x1abc]
and dword [ebp - 0x1ac4], edi
mov ecx, edx
mov dword [ebp - 0x1af0], eax
mov dword [ebp - 0x1ad0], ecx
test esi, esi
je 0x458efe
xor eax, eax
mov dword [ebp - 0x1ac8], eax
mov dword [ebp - 0x1ae0], 0xa
test ebx, ebx
jne 0x458e4f
mov al, byte [ecx]
xor ecx, ecx
cmp al, 0xa
sete cl
movsx eax, al
push eax
mov dword [ebp - 0x1ac0], ecx
call fcn.00459ccc
pop ecx
mov ecx, dword [ebp - 0x1ad0]
test eax, eax
jne 0x458d30
push 1
push ecx
lea eax, [ebp - 0x1acc]
push eax
call fcn.00459b80
add esp, 0xc
cmp eax, 0xffffffff
je 0x458ef3
mov eax, dword [ebp - 0x1ad0]
mov ecx, dword [ebp - 0x1ac8]
jmp 0x458d6c
mov eax, dword [ebp - 0x1abc]
sub eax, ecx
add eax, esi
cmp eax, 1
jbe 0x458ef3
push 2
push ecx
lea eax, [ebp - 0x1acc]
push eax
call fcn.00459b80
add esp, 0xc
cmp eax, 0xffffffff
je 0x458ef3
mov eax, dword [ebp - 0x1ad0]
mov ecx, dword [ebp - 0x1ac8]
inc eax
inc ecx
inc eax
inc ecx
mov dword [ebp - 0x1ac8], ecx
xor ecx, ecx
push ecx
push ecx
push 5
mov dword [ebp - 0x1ad0], eax
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 0x1acc]
push eax
push ecx
push dword [ebp - 0x1af0]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x1ae4], eax
test eax, eax
je 0x458ef3
push 0
lea ecx, [ebp - 0x1ac4]
push ecx
mov ecx, dword [ebp - 0x1ad8]
push eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x1ad4]
mov eax, dword [eax*4 + 0x56ab20]
push dword [ecx + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4592e1
mov eax, dword [ebp - 0x1ae4]
add edi, dword [ebp - 0x1ac4]
cmp dword [ebp - 0x1ac4], eax
jl 0x458ef3
cmp dword [ebp - 0x1ac0], 0
je 0x458edf
mov ecx, dword [ebp - 0x1ad8]
push 0
lea eax, [ebp - 0x1ac4]
push eax
push 1
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x1ad4]
mov eax, dword [eax*4 + 0x56ab20]
mov byte [ebp - 0xc], 0xd
push dword [ecx + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4592e1
cmp dword [ebp - 0x1ac4], 1
jl 0x458ef3
inc dword [ebp - 0x1adc]
inc edi
jmp 0x458edf
cmp ebx, 1
je 0x458e59
cmp ebx, 2
jne 0x458e8c
movzx eax, word [ecx]
xor edx, edx
cmp ax, word [ebp - 0x1ae0]
mov dword [ebp - 0x1acc], eax
mov eax, dword [ebp - 0x1ac8]
sete dl
add ecx, 2
add eax, 2
mov dword [ebp - 0x1ad0], ecx
mov dword [ebp - 0x1ac8], eax
mov dword [ebp - 0x1ac0], edx
cmp ebx, 1
je 0x458e96
cmp ebx, 2
jne 0x458eeb
push dword [ebp - 0x1acc]
call fcn.00460d01
pop ecx
cmp ax, word [ebp - 0x1acc]
jne 0x4592e1
add edi, 2
cmp dword [ebp - 0x1ac0], 0
je 0x458edf
push 0xd
pop eax
push eax
mov dword [ebp - 0x1acc], eax
call fcn.00460d01
pop ecx
cmp ax, word [ebp - 0x1acc]
jne 0x4592e1
inc edi
inc dword [ebp - 0x1adc]
mov eax, dword [ebp - 0x1ac8]
mov ecx, dword [ebp - 0x1ad0]
cmp eax, esi
jb 0x458cdc
mov esi, dword [ebp - 0x1ac0]
jmp 0x4592e9
mov esi, dword [ebp - 0x1ac0]
jmp 0x4592f3
mov eax, dword [ebp - 0x1ad4]
mov ecx, dword [eax*4 + 0x56ab20]
mov eax, dword [ebp - 0x1ad8]
test byte [eax + ecx + 4], 0x80
je 0x4592ba
mov edx, dword [ebp - 0x1abc]
xor esi, esi
mov dword [ebp - 0x1acc], esi
test ebx, ebx
jne 0x459016
mov dword [ebp - 0x1ac0], edx
cmp dword [ebp + 0x10], esi
jbe 0x459321
xor ecx, ecx
mov eax, edx
sub eax, dword [ebp - 0x1abc]
lea ebx, [ebp - 0x140c]
mov dword [ebp - 0x1ae0], ecx
cmp eax, dword [ebp + 0x10]
jae 0x458fab
mov cl, byte [edx]
inc edx
inc eax
mov byte [ebp - 0x1ae9], cl
cmp cl, 0xa
mov ecx, dword [ebp - 0x1ae0]
mov dword [ebp - 0x1ac0], edx
jne 0x458f8d
inc dword [ebp - 0x1adc]
mov byte [ebx], 0xd
inc ebx
inc ecx
mov dl, byte [ebp - 0x1ae9]
mov byte [ebx], dl
mov edx, dword [ebp - 0x1ac0]
inc ebx
inc ecx
mov dword [ebp - 0x1ae0], ecx
cmp ecx, 0x13ff
jb 0x458f62
mov ecx, dword [ebp - 0x1ad8]
lea eax, [ebp - 0x140c]
sub ebx, eax
push 0
lea eax, [ebp - 0x1ae8]
push eax
push ebx
lea eax, [ebp - 0x140c]
push eax
mov eax, dword [ebp - 0x1ad4]
mov eax, dword [eax*4 + 0x56ab20]
push dword [ecx + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4592e1
add edi, dword [ebp - 0x1ae8]
cmp dword [ebp - 0x1ae8], ebx
jl 0x4592e9
mov edx, dword [ebp - 0x1ac0]
mov eax, edx
sub eax, dword [ebp - 0x1abc]
cmp eax, dword [ebp + 0x10]
jb 0x458f4c
jmp 0x4592e9
cmp ebx, 2
jne 0x45913d
mov eax, edx
mov dword [ebp - 0x1ac4], eax
cmp dword [ebp + 0x10], esi
jbe 0x459321
mov dword [ebp - 0x1ae0], 0xa
mov dword [ebp - 0x1ac0], eax
xor ecx, ecx
sub dword [ebp - 0x1ac0], edx
mov edx, dword [ebp - 0x1ac0]
lea ebx, [ebp - 0x140c]
cmp edx, dword [ebp + 0x10]
jae 0x4590c6
movzx esi, word [eax]
add eax, 2
add edx, 2
cmp si, word [ebp - 0x1ae0]
mov dword [ebp - 0x1ae4], esi
mov esi, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ac4], eax
jne 0x45909e
cmp ecx, 0x13fc
ja 0x4590bd
add dword [ebp - 0x1adc], 2
push 0xd
pop eax
mov word [ebx], ax
mov eax, dword [ebp - 0x1ac4]
add ebx, 2
add ecx, 2
mov esi, dword [ebp - 0x1ae4]
mov word [ebx], si
mov esi, dword [ebp - 0x1acc]
add ecx, 2
add ebx, 2
cmp ecx, 0x13fe
jb 0x459054
jmp 0x4590c6
sub eax, 2
mov dword [ebp - 0x1ac4], eax
mov ecx, dword [ebp - 0x1ad8]
lea eax, [ebp - 0x140c]
sub ebx, eax
push 0
lea eax, [ebp - 0x1ae8]
push eax
push ebx
lea eax, [ebp - 0x140c]
push eax
mov eax, dword [ebp - 0x1ad4]
mov eax, dword [eax*4 + 0x56ab20]
push dword [ecx + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4592e1
mov eax, dword [ebp - 0x1ae8]
add edi, eax
cmp eax, ebx
jl 0x4592e9
mov edx, dword [ebp - 0x1abc]
test eax, eax
je 0x4592ef
mov eax, dword [ebp - 0x1ac4]
sub eax, edx
cmp eax, dword [ebp + 0x10]
mov eax, dword [ebp - 0x1ac4]
jb 0x45903a
jmp 0x4592ef
mov ebx, dword [ebp + 0x10]
mov ecx, edx
mov dword [ebp - 0x1ac8], ecx
test ebx, ebx
je 0x459321
mov dword [ebp - 0x1ae0], 0xa
and dword [ebp - 0x1ae4], 0
mov dword [ebp - 0x1ac4], ecx
sub dword [ebp - 0x1ac4], edx
mov edx, dword [ebp - 0x1ae4]
lea eax, [ebp - 0x1ab8]
cmp dword [ebp - 0x1ac4], ebx
jae 0x4591eb
movzx esi, word [ecx]
add dword [ebp - 0x1ac4], 2
add ecx, 2
cmp si, word [ebp - 0x1ae0]
mov dword [ebp - 0x1ae4], esi
mov esi, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ac8], ecx
jne 0x4591c3
cmp edx, 0x6a6
ja 0x4591e2
push 0xd
pop ecx
mov word [eax], cx
mov ecx, dword [ebp - 0x1ac8]
add eax, 2
add edx, 2
mov esi, dword [ebp - 0x1ae4]
mov word [eax], si
mov esi, dword [ebp - 0x1acc]
add edx, 2
add eax, 2
cmp edx, 0x6a8
jb 0x459179
jmp 0x4591eb
sub ecx, 2
mov dword [ebp - 0x1ac8], ecx
push 0
push 0
push 0xd55
lea ecx, [ebp - 0xd64]
push ecx
lea ecx, [ebp - 0x1ab8]
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
push eax
mov eax, ecx
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x1ac4], eax
test eax, eax
je 0x4592e1
xor ecx, ecx
mov dword [ebp - 0x1ac0], ecx
push 0
sub eax, ecx
lea edx, [ebp - 0x1ae8]
push edx
push eax
lea eax, [ebp - 0xd64]
add eax, ecx
mov ecx, dword [ebp - 0x1ad8]
push eax
mov eax, dword [ebp - 0x1ad4]
mov eax, dword [eax*4 + 0x56ab20]
push dword [ecx + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x459282
mov ecx, dword [ebp - 0x1ac0]
add ecx, dword [ebp - 0x1ae8]
mov eax, dword [ebp - 0x1ac4]
mov dword [ebp - 0x1ac0], ecx
cmp eax, ecx
jg 0x45922f
jmp 0x45929c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x1ac0]
mov esi, eax
mov eax, dword [ebp - 0x1ac4]
mov dword [ebp - 0x1acc], esi
cmp eax, ecx
jg 0x4592e9
mov ecx, dword [ebp - 0x1ac8]
mov edx, dword [ebp - 0x1abc]
mov edi, ecx
sub edi, edx
cmp edi, ebx
jb 0x45915a
jmp 0x4592ef
push 0
lea edx, [ebp - 0x1ae8]
push edx
push esi
push dword [ebp - 0x1abc]
push dword [eax + ecx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4592e1
mov edi, dword [ebp - 0x1ae8]
xor esi, esi
jmp 0x4592e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov edx, dword [ebp - 0x1abc]
test edi, edi
jne 0x45935c
test esi, esi
je 0x459321
push 5
pop ebx
cmp esi, ebx
jne 0x459315
call fcn.00454169
mov dword [eax], 9
call fcn.00454181
mov dword [eax], ebx
jmp 0x458bb9
push esi
call fcn.00454199
pop ecx
jmp 0x458bb9
mov eax, dword [ebp - 0x1ad4]
mov eax, dword [eax*4 + 0x56ab20]
mov ecx, dword [ebp - 0x1ad8]
test byte [ecx + eax + 4], 0x40
je 0x459344
cmp byte [edx], 0x1a
je 0x458b8f
call fcn.00454169
mov dword [eax], 0x1c
call fcn.00454181
and dword [eax], 0
jmp 0x458bb9
sub edi, dword [ebp - 0x1adc]
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045276d
leave
ret