Function at 0x4b32f0
Capabilities:
Write file on windows

Disassembly:
mov esi, esi
mov eax, 0x1ae4
push ebp
mov ebp, esp
call fcn.004b13b0
mov eax, dword [0x4ef1f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x1acc], eax
xor edi, edi
mov dword [ebp - 0x1ac8], edi
mov dword [ebp - 0x1ad0], edi
cmp dword [ebp + 0x10], edi
jne 0x4b332d
xor eax, eax
jmp 0x4b3a16
cmp eax, edi
jne 0x4b3358
call fcn.004a6a5e
mov dword [eax], edi
call fcn.004a6a4b
push edi
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
call fcn.004a648d
add esp, 0x14
or eax, 0xffffffff
jmp 0x4b3a16
push ebx
push esi
mov edi, dword [ebp + 8]
mov eax, edi
sar eax, 5
lea esi, [eax*4 + 0x5001c0]
mov eax, dword [esi]
and edi, 0x1f
shl edi, 6
add eax, edi
mov bl, byte [eax + 0x24]
add bl, bl
sar bl, 1
mov dword [ebp - 0x1ad8], esi
cmp bl, 2
mov byte [ebp - 0x1ad9], bl
je 0x4b3390
cmp bl, 1
jne 0x4b33c0
mov ecx, dword [ebp + 0x10]
not ecx
test cl, 1
jne 0x4b33c0
call fcn.004a6a5e
xor esi, esi
mov dword [eax], esi
call fcn.004a6a4b
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.004a648d
add esp, 0x14
jmp 0x4b3a03
test byte [eax + 4], 0x20
je 0x4b33d7
push 2
push 0
push 0
push dword [ebp + 8]
call fcn.004ad9b6
sub esp, 0xfffffff0
push dword [ebp + 8]
call fcn.004b941b
pop ecx
test eax, eax
je 0x4b3685
mov eax, dword [esi]
test byte [edi + eax + 4], 0x80
je 0x4b3685
call fcn.004b6170
xor ecx, ecx
mov eax, dword [eax + 0x6c]
cmp dword [eax + 0x14], ecx
sete cl
lea eax, [ebp - 0x1ae4]
push eax
mov eax, dword [esi]
push dword [edi + eax]
mov dword [ebp - 0x1ae0], ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
or eax, eax
je 0x4b3685
xor ecx, ecx
cmp dword [ebp - 0x1ae0], ecx
je 0x4b3437
test bl, bl
je 0x4b3687
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
mov esi, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ae4], eax
xor eax, eax
mov dword [ebp - 0x1ac4], eax
cmp dword [ebp + 0x10], eax
jbe 0x4b399c
mov dword [ebp - 0x1abc], eax
mov al, byte [ebp - 0x1ad9]
or al, al
jne 0x4b35d5
xor eax, eax
mov ebx, dword [ebp - 0x1ad8]
mov cl, byte [esi]
cmp cl, 0xa
sete al
mov dword [ebp - 0x1ae0], eax
mov eax, dword [ebx]
add eax, edi
cmp dword [eax + 0x38], 0
je 0x4b34a3
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 0x4b34ee
movsx eax, cl
push eax
call fcn.004bad79
pop ecx
or eax, eax
je 0x4b34eb
mov ecx, dword [ebp - 0x1acc]
sub ecx, esi
add ecx, dword [ebp + 0x10]
xor eax, eax
inc eax
cmp ecx, eax
jbe 0x4b366c
push 2
push esi
lea eax, [ebp - 0x1ac0]
push eax
call fcn.004b251f
add esp, 0xc
cmp eax, 0xffffffff
je 0x4b3993
inc esi
inc dword [ebp - 0x1abc]
jmp 0x4b3506
push 1
push esi
lea eax, [ebp - 0x1ac0]
push eax
call fcn.004b251f
sub esp, 0xfffffff4
cmp eax, 0xffffffff
je 0x4b3993
lea ebx, [ebp - 0xc]
lea ecx, [ebp - 0x1ac0]
xor eax, eax
inc esi
push eax
push eax
push 5
push ebx
push 1
push ecx
push eax
push dword [ebp - 0x1ae4]
inc dword [ebp - 0x1abc]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
or ebx, ebx
je 0x4b3993
push 0
lea eax, [ebp - 0x1ac4]
push eax
push ebx
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x1ad8]
mov eax, dword [eax]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
or eax, eax
je 0x4b3987
mov eax, dword [ebp - 0x1abc]
mov ecx, dword [ebp - 0x1ad0]
add eax, ecx
cmp dword [ebp - 0x1ac4], ebx
mov dword [ebp - 0x1ac8], eax
jl 0x4b3993
cmp dword [ebp - 0x1ae0], 0
je 0x4b3658
push 0
lea ebx, [ebp - 0xc]
lea eax, [ebp - 0x1ac4]
push eax
push 1
push ebx
mov eax, dword [ebp - 0x1ad8]
mov eax, dword [eax]
mov byte [ebp - 0xc], 0xd
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
or eax, eax
je 0x4b3987
cmp dword [ebp - 0x1ac4], 1
jl 0x4b3993
inc dword [ebp - 0x1ad0]
inc dword [ebp - 0x1ac8]
jmp 0x4b3658
cmp al, 1
je 0x4b35dd
cmp al, 2
jne 0x4b35fe
movzx ebx, word [esi]
xor ecx, ecx
cmp bx, 0xa
sete cl
inc esi
inc esi
sub dword [ebp - 0x1abc], 0xfffffffe
mov dword [ebp - 0x1ac0], ebx
mov dword [ebp - 0x1ae0], ecx
cmp al, 1
je 0x4b3606
cmp al, 2
jne 0x4b3658
push dword [ebp - 0x1ac0]
call fcn.004c03ec
cmp ax, word [ebp - 0x1ac0]
pop ecx
jne 0x4b3987
add dword [ebp - 0x1ac8], 2
cmp dword [ebp - 0x1ae0], 0
je 0x4b3658
push 0xd
pop eax
push eax
mov dword [ebp - 0x1ac0], eax
call fcn.004c03ec
cmp ax, word [ebp - 0x1ac0]
pop ecx
jne 0x4b3987
inc dword [ebp - 0x1ac8]
inc dword [ebp - 0x1ad0]
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x1abc], eax
jb 0x4b3460
jmp 0x4b3993
mov dl, byte [esi]
mov ecx, dword [ebx]
inc dword [ebp - 0x1ac8]
mov byte [edi + ecx + 0x34], dl
mov ecx, dword [ebx]
mov dword [edi + ecx + 0x38], eax
jmp 0x4b3993
xor ecx, ecx
mov eax, dword [esi]
add eax, edi
test byte [eax + 4], 0x80
je 0x4b3954
mov eax, dword [ebp - 0x1acc]
or bl, bl
mov dword [ebp - 0x1ac0], ecx
jne 0x4b3773
mov dword [ebp - 0x1ac4], eax
cmp dword [ebp + 0x10], ecx
jbe 0x4b39d8
jmp 0x4b36c0
mov esi, dword [ebp - 0x1ad8]
lea eax, [ebp - 0x1ab8]
mov ecx, dword [ebp - 0x1ac4]
and dword [ebp - 0x1abc], 0
sub ecx, dword [ebp - 0x1acc]
cmp ecx, dword [ebp + 0x10]
jae 0x4b3717
mov edx, dword [ebp - 0x1ac4]
inc dword [ebp - 0x1ac4]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4b3702
inc dword [ebp - 0x1ad0]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x1abc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x1abc]
cmp dword [ebp - 0x1abc], 0x13ff
jb 0x4b36d9
mov ebx, eax
lea eax, [ebp - 0x1ab8]
sub ebx, eax
push 0
lea eax, [ebp - 0x1ad4]
push eax
push ebx
lea eax, [ebp - 0x1ab8]
push eax
mov eax, dword [esi]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4b3987
mov eax, dword [ebp - 0x1ad4]
add dword [ebp - 0x1ac8], eax
cmp eax, ebx
jl 0x4b3993
mov eax, dword [ebp - 0x1ac4]
sub eax, dword [ebp - 0x1acc]
cmp eax, dword [ebp + 0x10]
jb 0x4b36ba
jmp 0x4b3993
mov dword [ebp - 0x1abc], eax
cmp bl, 2
jne 0x4b3853
cmp dword [ebp + 0x10], ecx
jbe 0x4b39d8
jmp 0x4b3793
mov esi, dword [ebp - 0x1ad8]
mov ecx, dword [ebp - 0x1abc]
lea eax, [ebp - 0x1ab8]
and dword [ebp - 0x1ac4], 0
sub ecx, dword [ebp - 0x1acc]
cmp ecx, dword [ebp + 0x10]
jae 0x4b37f7
mov edx, dword [ebp - 0x1abc]
sub dword [ebp - 0x1abc], 0xfffffffe
inc ecx
inc ecx
movzx edx, word [edx]
cmp dx, 0xa
jne 0x4b37df
add dword [ebp - 0x1ad0], 2
push 0xd
pop ebx
mov word [eax], bx
inc eax
inc eax
sub dword [ebp - 0x1ac4], 0xfffffffe
add dword [ebp - 0x1ac4], 2
mov word [eax], dx
inc eax
inc eax
cmp dword [ebp - 0x1ac4], 0x13fe
jb 0x4b37ac
push 0
mov ebx, eax
lea eax, [ebp - 0x1ab8]
sub ebx, eax
lea eax, [ebp - 0x1ad4]
push eax
push ebx
lea eax, [ebp - 0x1ab8]
push eax
mov eax, dword [esi]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4b3987
mov eax, dword [ebp - 0x1ad4]
add dword [ebp - 0x1ac8], eax
cmp eax, ebx
jl 0x4b3993
mov eax, dword [ebp - 0x1abc]
sub eax, dword [ebp - 0x1acc]
cmp eax, dword [ebp + 0x10]
jb 0x4b378d
jmp 0x4b3993
cmp dword [ebp + 0x10], ecx
jbe 0x4b39d8
lea eax, [ebp - 0x6b8]
mov ebx, dword [ebp - 0x1abc]
and dword [ebp - 0x1ac4], 0
sub ebx, dword [ebp - 0x1acc]
push 2
pop esi
cmp ebx, dword [ebp + 0x10]
jae 0x4b38b9
mov edx, dword [ebp - 0x1abc]
movzx edx, word [edx]
add dword [ebp - 0x1abc], esi
add ebx, esi
cmp dx, 0xa
jne 0x4b38a2
push 0xd
pop ecx
mov word [eax], cx
add eax, esi
add dword [ebp - 0x1ac4], esi
add dword [ebp - 0x1ac4], esi
mov word [eax], dx
add eax, esi
cmp dword [ebp - 0x1ac4], 0x6a8
jb 0x4b3878
xor ebx, ebx
push ebx
lea edx, [ebp - 0x1410]
push ebx
lea ecx, [ebp - 0x6b8]
sub eax, ecx
push 0xd55
push edx
cdq
sub eax, edx
sar eax, 1
push eax
mov eax, ecx
push eax
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, eax
cmp esi, ebx
je 0x4b3987
push 0
lea eax, [ebp - 0x1ad4]
push eax
mov eax, esi
sub eax, ebx
push eax
lea eax, [ebp + ebx - 0x1410]
push eax
mov eax, dword [ebp - 0x1ad8]
mov eax, dword [eax]
push dword [edi + eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4b3927
add ebx, dword [ebp - 0x1ad4]
cmp esi, ebx
jg 0x4b38f0
jmp 0x4b3933
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1ac0], eax
cmp esi, ebx
jg 0x4b3993
mov eax, dword [ebp - 0x1abc]
sub eax, dword [ebp - 0x1acc]
mov dword [ebp - 0x1ac8], eax
cmp eax, dword [ebp + 0x10]
jb 0x4b385c
jmp 0x4b3993
lea ecx, [ebp - 0x1ad4]
push 0
push ecx
push dword [ebp + 0x10]
push dword [ebp - 0x1acc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
or eax, eax
je 0x4b3987
mov eax, dword [ebp - 0x1ad4]
and dword [ebp - 0x1ac0], 0
mov dword [ebp - 0x1ac8], eax
jmp 0x4b3993
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1ac0], eax
cmp dword [ebp - 0x1ac8], 0
jne 0x4b3a08
cmp dword [ebp - 0x1ac0], 0
je 0x4b39d2
push 5
pop ebx
cmp dword [ebp - 0x1ac0], ebx
jne 0x4b39c4
call fcn.004a6a4b
mov dword [eax], 9
call fcn.004a6a5e
mov dword [eax], ebx
jmp 0x4b3a03
push dword [ebp - 0x1ac0]
call fcn.004a6a71
pop edx
jmp 0x4b3a03
mov esi, dword [ebp - 0x1ad8]
mov eax, dword [esi]
test byte [edi + eax + 4], 0x40
je 0x4b39f0
mov eax, dword [ebp - 0x1acc]
cmp byte [eax], 0x1a
jne 0x4b39f0
xor eax, eax
jmp 0x4b3a14
call fcn.004a6a4b
mov dword [eax], 0x1c
call fcn.004a6a5e
and dword [eax], 0
or eax, 0xffffffff
jmp 0x4b3a14
mov eax, dword [ebp - 0x1ac8]
sub eax, dword [ebp - 0x1ad0]
pop esi
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b7a8b
leave
ret