Function at 0x45bc77
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1ae4
call fcn.0044df10
mov eax, dword [0x4a46c8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 0x1acc], eax
mov dword [ebp - 0x1ac8], edi
mov dword [ebp - 0x1ad0], edi
cmp dword [ebp + 0x10], edi
jne 0x45bcb8
xor eax, eax
jmp 0x45c368
cmp eax, edi
jne 0x45bcdb
call fcn.00451817
mov dword [eax], edi
call fcn.00451804
mov dword [eax], 0x16
call fcn.00456077
or eax, 0xffffffff
jmp 0x45c368
mov eax, esi
sar eax, 5
mov edi, esi
push ebx
lea ebx, [eax*4 + 0x4c3a40]
mov eax, dword [ebx]
and edi, 0x1f
shl edi, 6
add eax, edi
mov cl, byte [eax + 0x24]
add cl, cl
sar cl, 1
mov dword [ebp - 0x1adc], ebx
mov byte [ebp - 0x1ac1], cl
cmp cl, 2
je 0x45bd11
cmp cl, 1
jne 0x45bd38
mov ecx, dword [ebp + 0x10]
not ecx
test cl, 1
jne 0x45bd38
call fcn.00451817
and dword [eax], 0
call fcn.00451804
mov dword [eax], 0x16
call fcn.00456077
jmp 0x45c356
test byte [eax + 4], 0x20
je 0x45bd4d
push 2
push 0
push 0
push esi
call fcn.0046043a
add esp, 0x10
push esi
call fcn.0045fd0d
pop ecx
test eax, eax
je 0x45bff5
mov eax, dword [ebx]
test byte [edi + eax + 4], 0x80
je 0x45bff5
call fcn.00452b15
mov eax, dword [eax + 0x6c]
xor ecx, ecx
cmp dword [eax + 0x14], ecx
lea eax, [ebp - 0x1ae0]
sete cl
push eax
mov eax, dword [ebx]
push dword [edi + eax]
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
xor ecx, ecx
cmp eax, ecx
je 0x45bff7
cmp esi, ecx
je 0x45bda7
cmp byte [ebp - 0x1ac1], cl
je 0x45bff7
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
mov ebx, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ae0], eax
xor eax, eax
mov dword [ebp - 0x1ad4], eax
cmp dword [ebp + 0x10], eax
jbe 0x45c2ef
mov dword [ebp - 0x1ac0], eax
mov al, byte [ebp - 0x1ac1]
test al, al
jne 0x45bf45
mov cl, byte [ebx]
mov esi, dword [ebp - 0x1adc]
xor eax, eax
cmp cl, 0xa
sete al
mov dword [ebp - 0x1ae4], eax
mov eax, dword [esi]
add eax, edi
cmp dword [eax + 0x38], 0
je 0x45be13
mov dl, byte [eax + 0x34]
mov byte [ebp - 0xc], dl
mov byte [ebp - 0xb], cl
and dword [eax + 0x38], 0
push 2
lea eax, [ebp - 0xc]
push eax
jmp 0x45be5e
movsx eax, cl
push eax
call fcn.00459afa
pop ecx
test eax, eax
je 0x45be5b
mov ecx, dword [ebp - 0x1acc]
sub ecx, ebx
add ecx, dword [ebp + 0x10]
xor eax, eax
inc eax
cmp ecx, eax
jbe 0x45bfdc
push 2
lea eax, [ebp - 0x1abc]
push ebx
push eax
call fcn.0046026b
add esp, 0xc
cmp eax, 0xffffffff
je 0x45c2e6
inc ebx
inc dword [ebp - 0x1ac0]
jmp 0x45be76
push 1
push ebx
lea eax, [ebp - 0x1abc]
push eax
call fcn.0046026b
add esp, 0xc
cmp eax, 0xffffffff
je 0x45c2e6
xor eax, eax
push eax
push eax
push 5
lea ecx, [ebp - 0xc]
push ecx
push 1
lea ecx, [ebp - 0x1abc]
push ecx
push eax
push dword [ebp - 0x1ae0]
inc ebx
inc dword [ebp - 0x1ac0]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, eax
test esi, esi
je 0x45c2e6
push 0
lea eax, [ebp - 0x1ad4]
push eax
push esi
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x45c2da
mov eax, dword [ebp - 0x1ac0]
mov ecx, dword [ebp - 0x1ad0]
add eax, ecx
mov dword [ebp - 0x1ac8], eax
cmp dword [ebp - 0x1ad4], esi
jl 0x45c2e6
cmp dword [ebp - 0x1ae4], 0
je 0x45bfc8
push 0
lea eax, [ebp - 0x1ad4]
push eax
push 1
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
mov byte [ebp - 0xc], 0xd
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x45c2da
cmp dword [ebp - 0x1ad4], 1
jl 0x45c2e6
inc dword [ebp - 0x1ad0]
inc dword [ebp - 0x1ac8]
jmp 0x45bfc8
cmp al, 1
je 0x45bf4d
cmp al, 2
jne 0x45bf6e
movzx esi, word [ebx]
xor ecx, ecx
cmp si, 0xa
sete cl
inc ebx
inc ebx
add dword [ebp - 0x1ac0], 2
mov dword [ebp - 0x1abc], esi
mov dword [ebp - 0x1ae4], ecx
cmp al, 1
je 0x45bf76
cmp al, 2
jne 0x45bfc8
push dword [ebp - 0x1abc]
call fcn.004605a9
pop ecx
cmp ax, word [ebp - 0x1abc]
jne 0x45c2da
add dword [ebp - 0x1ac8], 2
cmp dword [ebp - 0x1ae4], 0
je 0x45bfc8
push 0xd
pop eax
push eax
mov dword [ebp - 0x1abc], eax
call fcn.004605a9
pop ecx
cmp ax, word [ebp - 0x1abc]
jne 0x45c2da
inc dword [ebp - 0x1ac8]
inc dword [ebp - 0x1ad0]
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x1ac0], eax
jb 0x45bdd0
jmp 0x45c2e6
mov ecx, dword [esi]
mov dl, byte [ebx]
inc dword [ebp - 0x1ac8]
mov byte [edi + ecx + 0x34], dl
mov ecx, dword [esi]
mov dword [edi + ecx + 0x38], eax
jmp 0x45c2e6
xor ecx, ecx
mov eax, dword [ebx]
add eax, edi
test byte [eax + 4], 0x80
je 0x45c2a8
cmp byte [ebp - 0x1ac1], 0
mov dword [ebp - 0x1abc], ecx
jne 0x45c0c0
mov ebx, dword [ebp - 0x1acc]
cmp dword [ebp + 0x10], ecx
jbe 0x45c325
mov ecx, ebx
xor esi, esi
sub ecx, dword [ebp - 0x1acc]
lea eax, [ebp - 0x1ab8]
cmp ecx, dword [ebp + 0x10]
jae 0x45c062
mov dl, byte [ebx]
inc ebx
inc ecx
mov dword [ebp - 0x1ae0], ebx
cmp dl, 0xa
jne 0x45c056
inc dword [ebp - 0x1ad0]
mov byte [eax], 0xd
inc eax
inc esi
mov byte [eax], dl
inc eax
inc esi
cmp esi, 0x13ff
jb 0x45c037
mov esi, eax
lea eax, [ebp - 0x1ab8]
sub esi, eax
push 0
lea eax, [ebp - 0x1ad8]
push eax
push esi
lea eax, [ebp - 0x1ab8]
push eax
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x45c2da
mov eax, dword [ebp - 0x1ad8]
add dword [ebp - 0x1ac8], eax
cmp eax, esi
jl 0x45c2e6
mov eax, ebx
sub eax, dword [ebp - 0x1acc]
cmp eax, dword [ebp + 0x10]
jb 0x45c027
jmp 0x45c2e6
cmp byte [ebp - 0x1ac1], 2
jne 0x45c19b
mov ebx, dword [ebp - 0x1acc]
cmp dword [ebp + 0x10], ecx
jbe 0x45c325
and dword [ebp - 0x1ac0], 0
mov ecx, ebx
sub ecx, dword [ebp - 0x1acc]
push 2
lea eax, [ebp - 0x1ab8]
pop esi
cmp ecx, dword [ebp + 0x10]
jae 0x45c13d
movzx edx, word [ebx]
add ebx, esi
add ecx, esi
mov dword [ebp - 0x1ae0], ebx
cmp dx, 0xa
jne 0x45c126
add dword [ebp - 0x1ad0], esi
push 0xd
pop ebx
mov word [eax], bx
mov ebx, dword [ebp - 0x1ae0]
add eax, esi
add dword [ebp - 0x1ac0], esi
add dword [ebp - 0x1ac0], esi
mov word [eax], dx
add eax, esi
cmp dword [ebp - 0x1ac0], 0x13fe
jb 0x45c0f4
mov esi, eax
lea eax, [ebp - 0x1ab8]
sub esi, eax
push 0
lea eax, [ebp - 0x1ad8]
push eax
push esi
lea eax, [ebp - 0x1ab8]
push eax
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x45c2da
mov eax, dword [ebp - 0x1ad8]
add dword [ebp - 0x1ac8], eax
cmp eax, esi
jl 0x45c2e6
mov eax, ebx
sub eax, dword [ebp - 0x1acc]
cmp eax, dword [ebp + 0x10]
jb 0x45c0dc
jmp 0x45c2e6
mov eax, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ad4], eax
cmp dword [ebp + 0x10], ecx
jbe 0x45c325
mov ecx, dword [ebp - 0x1ad4]
and dword [ebp - 0x1ac0], 0
sub ecx, dword [ebp - 0x1acc]
push 2
lea eax, [ebp - 0x6b8]
pop esi
cmp ecx, dword [ebp + 0x10]
jae 0x45c20d
mov edx, dword [ebp - 0x1ad4]
movzx edx, word [edx]
add dword [ebp - 0x1ad4], esi
add ecx, esi
cmp dx, 0xa
jne 0x45c1f6
push 0xd
pop ebx
mov word [eax], bx
add eax, esi
add dword [ebp - 0x1ac0], esi
add dword [ebp - 0x1ac0], esi
mov word [eax], dx
add eax, esi
cmp dword [ebp - 0x1ac0], 0x6a8
jb 0x45c1cc
xor esi, esi
push esi
push esi
push 0xd55
lea ecx, [ebp - 0x1410]
push ecx
lea ecx, [ebp - 0x6b8]
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
push eax
mov eax, ecx
push eax
push esi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
cmp ebx, esi
je 0x45c2da
push 0
lea eax, [ebp - 0x1ad8]
push eax
mov eax, ebx
sub eax, esi
push eax
lea eax, [ebp + esi - 0x1410]
push eax
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x45c27b
add esi, dword [ebp - 0x1ad8]
cmp ebx, esi
jg 0x45c244
jmp 0x45c287
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1abc], eax
cmp ebx, esi
jg 0x45c2e6
mov eax, dword [ebp - 0x1ad4]
sub eax, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ac8], eax
cmp eax, dword [ebp + 0x10]
jb 0x45c1b0
jmp 0x45c2e6
push ecx
lea ecx, [ebp - 0x1ad8]
push ecx
push dword [ebp + 0x10]
push dword [ebp - 0x1acc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x45c2da
mov eax, dword [ebp - 0x1ad8]
and dword [ebp - 0x1abc], 0
mov dword [ebp - 0x1ac8], eax
jmp 0x45c2e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1abc], eax
cmp dword [ebp - 0x1ac8], 0
jne 0x45c35b
cmp dword [ebp - 0x1abc], 0
je 0x45c325
push 5
pop esi
cmp dword [ebp - 0x1abc], esi
jne 0x45c317
call fcn.00451804
mov dword [eax], 9
call fcn.00451817
mov dword [eax], esi
jmp 0x45c356
push dword [ebp - 0x1abc]
call fcn.0045182a
pop ecx
jmp 0x45c356
mov eax, dword [ebp - 0x1adc]
mov eax, dword [eax]
test byte [edi + eax + 4], 0x40
je 0x45c343
mov eax, dword [ebp - 0x1acc]
cmp byte [eax], 0x1a
jne 0x45c343
xor eax, eax
jmp 0x45c367
call fcn.00451804
mov dword [eax], 0x1c
call fcn.00451817
and dword [eax], 0
or eax, 0xffffffff
jmp 0x45c367
mov eax, dword [ebp - 0x1ac8]
sub eax, dword [ebp - 0x1ad0]
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00457523
leave
ret