Function at 0x466d20
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4734e0
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x49200c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
sar eax, 6
mov ecx, dword [ebp + 0xc]
and ecx, 0x3f
imul edx, ecx, 0x38
mov eax, dword [eax*4 + 0x4939f0]
mov ecx, dword [eax + edx + 0x18]
mov dword [ebp - 0x88], ecx
mov edx, dword [ebp + 0x10]
add edx, dword [ebp + 0x14]
mov dword [ebp - 0x58], edx
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov dword [ebp - 0x94], eax
mov ecx, dword [ebp + 0x18]
call fcn.004313b0
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x78]
mov ecx, dword [eax]
cmp dword [ecx + 8], 0xfde9
jne 0x466da1
mov byte [ebp - 0x3d], 1
jmp 0x466da5
mov byte [ebp - 0x3d], 0
mov dl, byte [ebp - 0x3d]
mov byte [ebp - 0x3e], dl
xor eax, eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp - 0x38]
cmp edx, dword [ebp - 0x58]
jae 0x4675ce
mov eax, dword [ebp - 0x38]
mov cl, byte [eax]
mov byte [ebp - 0x3f], cl
xor edx, edx
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x5c], 1
movzx eax, byte [ebp - 0x3e]
test eax, eax
je 0x46721b
mov ecx, dword [ebp + 0xc]
sar ecx, 6
mov edx, dword [ebp + 0xc]
and edx, 0x3f
imul eax, edx, 0x38
mov ecx, dword [ecx*4 + 0x4939f0]
mov dl, byte [ecx + eax + 0x2d]
shr dl, 2
and dl, 1
movzx eax, dl
test eax, eax
je 0x466e35
push str.__dbcsBufferUsed_fh_
push 0x4744f8
push 0
push 0x94
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.0041f160
add esp, 0x18
cmp eax, 1
jne 0x466e35
int3
mov dword [ebp - 0xa8], 5
mov dword [ebp - 0x3c], 0
jmp 0x466e51
mov edx, dword [ebp - 0x3c]
add edx, 1
mov dword [ebp - 0x3c], edx
cmp dword [ebp - 0x3c], 5
jge 0x466e7d
mov eax, dword [ebp + 0xc]
sar eax, 6
mov ecx, dword [ebp + 0xc]
and ecx, 0x3f
imul edx, ecx, 0x38
mov eax, dword [eax*4 + 0x4939f0]
add eax, edx
mov ecx, dword [ebp - 0x3c]
movsx edx, byte [eax + ecx + 0x2e]
test edx, edx
je 0x466e7d
jmp 0x466e48
cmp dword [ebp - 0x3c], 0
jle 0x4670df
mov eax, dword [ebp + 0xc]
sar eax, 6
mov ecx, dword [ebp + 0xc]
and ecx, 0x3f
imul edx, ecx, 0x38
mov eax, dword [eax*4 + 0x4939f0]
add eax, edx
mov ecx, 1
imul edx, ecx, 0
movzx eax, byte [eax + edx + 0x2e]
push eax
call fcn.00467ec0
add esp, 4
movsx ecx, al
add ecx, 1
mov dword [ebp - 0x64], ecx
cmp dword [ebp - 0x64], 1
jle 0x466ecc
mov edx, dword [ebp - 0x3c]
cmp edx, dword [ebp - 0x64]
jl 0x466ef2
push str.1___mb_len__mb_buf_used___mb_len
push 0x4744f8
push 0
push 0x9d
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.0041f160
add esp, 0x18
cmp eax, 1
jne 0x466ef2
int3
mov ecx, dword [ebp - 0x64]
sub ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x84], ecx
mov edx, dword [ebp - 0x58]
sub edx, dword [ebp - 0x38]
cmp dword [ebp - 0x84], edx
jg 0x467037
mov dword [ebp - 0x48], 0
jmp 0x466f22
mov eax, dword [ebp - 0x48]
add eax, 1
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
cmp ecx, dword [ebp - 0x3c]
jge 0x466f50
mov edx, dword [ebp + 0xc]
sar edx, 6
mov eax, dword [ebp + 0xc]
and eax, 0x3f
imul ecx, eax, 0x38
add ecx, dword [edx*4 + 0x4939f0]
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x48]
mov cl, byte [ecx + eax + 0x2e]
mov byte [ebp + edx - 0x18], cl
jmp 0x466f19
mov dword [ebp - 0x4c], 0
jmp 0x466f62
mov edx, dword [ebp - 0x4c]
add edx, 1
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x84]
jge 0x466f81
mov ecx, dword [ebp - 0x4c]
add ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x38]
add edx, dword [ebp - 0x4c]
mov al, byte [edx]
mov byte [ebp + ecx - 0x18], al
jmp 0x466f59
mov dword [ebp - 0x68], 0
jmp 0x466f93
mov ecx, dword [ebp - 0x68]
add ecx, 1
mov dword [ebp - 0x68], ecx
mov edx, dword [ebp - 0x68]
cmp edx, dword [ebp - 0x3c]
jge 0x466fbb
mov eax, dword [ebp + 0xc]
sar eax, 6
mov ecx, dword [ebp + 0xc]
and ecx, 0x3f
imul edx, ecx, 0x38
add edx, dword [eax*4 + 0x4939f0]
mov eax, dword [ebp - 0x68]
mov byte [edx + eax + 0x2e], 0
jmp 0x466f8a
xor ecx, ecx
mov dword [ebp - 0x9c], ecx
mov dword [ebp - 0x98], ecx
lea edx, [ebp - 0x18]
mov dword [ebp - 0x8c], edx
cmp dword [ebp - 0x64], 4
jne 0x466fdf
mov dword [ebp - 0x5c], 2
mov eax, dword [ebp + 0x18]
push eax
lea ecx, [ebp - 0x9c]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
lea eax, [ebp - 0x8c]
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.004644e0
add esp, 0x14
cmp eax, 0xffffffff
jne 0x467022
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x34]
mov dword [edx], eax
mov ecx, dword [ebp - 0x30]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x2c]
mov dword [edx + 8], eax
mov eax, dword [ebp + 8]
jmp 0x4675e5
mov ecx, dword [ebp - 0x84]
mov edx, dword [ebp - 0x38]
lea eax, [edx + ecx - 1]
mov dword [ebp - 0x38], eax
jmp 0x4670da
mov ecx, dword [ebp - 0x58]
sub ecx, dword [ebp - 0x38]
mov dword [ebp - 0x70], ecx
mov edx, dword [ebp - 0x3c]
add edx, dword [ebp - 0x70]
cmp edx, 5
jl 0x467071
push str.mb_buf_used__bytes_to_add___mb_buf_size
push 0x4744f8
push 0
push 0xc3
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.0041f160
add esp, 0x18
cmp eax, 1
jne 0x467071
int3
mov dword [ebp - 0x50], 0
jmp 0x467083
mov ecx, dword [ebp - 0x50]
add ecx, 1
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
cmp edx, dword [ebp - 0x70]
jge 0x4670b5
mov eax, dword [ebp + 0xc]
sar eax, 6
mov ecx, dword [ebp + 0xc]
and ecx, 0x3f
imul edx, ecx, 0x38
add edx, dword [eax*4 + 0x4939f0]
mov eax, dword [ebp - 0x50]
add eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x50]
mov cl, byte [ecx]
mov byte [edx + eax + 0x2e], cl
jmp 0x46707a
mov edx, dword [ebp - 0x30]
add edx, dword [ebp - 0x70]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x34]
mov dword [eax], ecx
mov edx, dword [ebp - 0x30]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 8], ecx
mov eax, dword [ebp + 8]
jmp 0x4675e5
jmp 0x467216
lfence
mov edx, dword [ebp - 0x38]
movzx eax, byte [edx]
push eax
call fcn.00467ec0
add esp, 4
movsx ecx, al
add ecx, 1
mov dword [ebp - 0x74], ecx
mov edx, dword [ebp - 0x58]
sub edx, dword [ebp - 0x38]
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x74]
cmp eax, dword [ebp - 0x60]
jg 0x467184
xor ecx, ecx
mov dword [ebp - 0xa4], ecx
mov dword [ebp - 0xa0], ecx
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x90], edx
cmp dword [ebp - 0x74], 4
jne 0x46712f
mov dword [ebp - 0x5c], 2
mov eax, dword [ebp + 0x18]
push eax
lea ecx, [ebp - 0xa4]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
lea eax, [ebp - 0x90]
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.004644e0
add esp, 0x14
cmp eax, 0xffffffff
jne 0x467172
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x34]
mov dword [edx], eax
mov ecx, dword [ebp - 0x30]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x2c]
mov dword [edx + 8], eax
mov eax, dword [ebp + 8]
jmp 0x4675e5
mov ecx, dword [ebp - 0x74]
mov edx, dword [ebp - 0x38]
lea eax, [edx + ecx - 1]
mov dword [ebp - 0x38], eax
jmp 0x467216
cmp dword [ebp - 0x60], 5
jbe 0x4671b0
push str.available_bytes___sizeof__mbBuffer_fh__
push 0x4744f8
push 0
push 0xe3
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.0041f160
add esp, 0x18
cmp eax, 1
jne 0x4671b0
int3
mov dword [ebp - 0x54], 0
jmp 0x4671c2
mov edx, dword [ebp - 0x54]
add edx, 1
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x54]
cmp eax, dword [ebp - 0x60]
jge 0x4671f1
mov ecx, dword [ebp + 0xc]
sar ecx, 6
mov edx, dword [ebp + 0xc]
and edx, 0x3f
imul eax, edx, 0x38
add eax, dword [ecx*4 + 0x4939f0]
mov ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x54]
mov cl, byte [ecx]
mov byte [eax + edx + 0x2e], cl
jmp 0x4671b9
mov edx, dword [ebp - 0x30]
add edx, dword [ebp - 0x60]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x34]
mov dword [eax], ecx
mov edx, dword [ebp - 0x30]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 8], ecx
mov eax, dword [ebp + 8]
jmp 0x4675e5
jmp 0x467482
mov edx, dword [ebp + 0xc]
sar edx, 6
mov eax, dword [ebp + 0xc]
and eax, 0x3f
imul ecx, eax, 0x38
mov edx, dword [edx*4 + 0x4939f0]
mov al, byte [edx + ecx + 0x2d]
shr al, 2
and al, 1
movzx ecx, al
test ecx, ecx
je 0x467355
mov edx, dword [ebp - 0x78]
push edx
mov eax, dword [ebp + 0xc]
sar eax, 6
mov ecx, dword [ebp + 0xc]
and ecx, 0x3f
imul edx, ecx, 0x38
mov eax, dword [eax*4 + 0x4939f0]
add eax, edx
mov ecx, 1
imul edx, ecx, 0
movzx eax, byte [eax + edx + 0x2e]
push eax
call fcn.00450df0
add esp, 8
movzx ecx, ax
test ecx, ecx
jne 0x4672a4
push str._isleadbyte_fast_internal__dbcsBuffer_fh___locale_
push 0x4744f8
push 0
push 0xf2
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.0041f160
add esp, 0x18
cmp eax, 1
jne 0x4672a4
int3
mov eax, dword [ebp + 0xc]
sar eax, 6
mov ecx, dword [ebp + 0xc]
and ecx, 0x3f
imul edx, ecx, 0x38
add edx, dword [eax*4 + 0x4939f0]
mov eax, 1
imul ecx, eax, 0
mov eax, 1
imul eax, eax, 0
mov cl, byte [edx + ecx + 0x2e]
mov byte [ebp + eax - 0x20], cl
mov edx, 1
shl edx, 0
mov eax, dword [ebp - 0x38]
mov cl, byte [eax]
mov byte [ebp + edx - 0x20], cl
mov edx, dword [ebp + 0xc]
sar edx, 6
mov eax, dword [ebp + 0xc]
and eax, 0x3f
imul ecx, eax, 0x38
mov edx, dword [edx*4 + 0x4939f0]
mov al, byte [edx + ecx + 0x2d]
and al, 0xfb
mov ecx, dword [ebp + 0xc]
sar ecx, 6
mov edx, dword [ebp + 0xc]
and edx, 0x3f
imul edx, edx, 0x38
mov ecx, dword [ecx*4 + 0x4939f0]
mov byte [ecx + edx + 0x2d], al
mov edx, dword [ebp + 0x18]
push edx
push 2
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.0045a640
add esp, 0x10
cmp eax, 0xffffffff
jne 0x467350
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x34]
mov dword [edx], eax
mov ecx, dword [ebp - 0x30]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x2c]
mov dword [edx + 8], eax
mov eax, dword [ebp + 8]
jmp 0x4675e5
jmp 0x467482
lfence
mov ecx, dword [ebp - 0x78]
push ecx
mov edx, dword [ebp - 0x38]
movzx eax, byte [edx]
push eax
call fcn.00450df0
add esp, 8
movzx ecx, ax
test ecx, ecx
je 0x46744b
mov edx, dword [ebp - 0x38]
add edx, 1
cmp edx, dword [ebp - 0x58]
jae 0x4673c6
mov eax, dword [ebp + 0x18]
push eax
push 2
mov ecx, dword [ebp - 0x38]
push ecx
lea edx, [ebp - 0x44]
push edx
call fcn.0045a640
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4673b8
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x34]
mov dword [eax], ecx
mov edx, dword [ebp - 0x30]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 8], ecx
mov eax, dword [ebp + 8]
jmp 0x4675e5
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
jmp 0x467449
mov eax, dword [ebp + 0xc]
sar eax, 6
mov ecx, dword [ebp + 0xc]
and ecx, 0x3f
imul edx, ecx, 0x38
add edx, dword [eax*4 + 0x4939f0]
mov eax, 1
imul ecx, eax, 0
mov eax, dword [ebp - 0x38]
mov al, byte [eax]
mov byte [edx + ecx + 0x2e], al
mov ecx, dword [ebp + 0xc]
sar ecx, 6
mov edx, dword [ebp + 0xc]
and edx, 0x3f
imul eax, edx, 0x38
mov ecx, dword [ecx*4 + 0x4939f0]
mov dl, byte [ecx + eax + 0x2d]
or dl, 4
mov eax, dword [ebp + 0xc]
sar eax, 6
mov ecx, dword [ebp + 0xc]
and ecx, 0x3f
imul ecx, ecx, 0x38
mov eax, dword [eax*4 + 0x4939f0]
mov byte [eax + ecx + 0x2d], dl
mov ecx, dword [ebp - 0x30]
add ecx, 1
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x34]
mov dword [edx], eax
mov ecx, dword [ebp - 0x30]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x2c]
mov dword [edx + 8], eax
mov eax, dword [ebp + 8]
jmp 0x4675e5
jmp 0x467482
mov ecx, dword [ebp + 0x18]
push ecx
push 1
mov edx, dword [ebp - 0x38]
push edx
lea eax, [ebp - 0x44]
push eax
call fcn.0045a640
add esp, 0x10
cmp eax, 0xffffffff
jne 0x467482
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x34]
mov dword [ecx], edx
mov eax, dword [ebp - 0x30]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x2c]
mov dword [ecx + 8], edx
mov eax, dword [ebp + 8]
jmp 0x4675e5
mov eax, dword [ebp - 0x38]
add eax, 1
mov dword [ebp - 0x38], eax
push 0
push 0
push 5
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
lea eax, [ebp - 0x44]
push eax
push 0
mov ecx, dword [ebp - 0x94]
push ecx
call fcn.0044c310
add esp, 0x20
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0
jne 0x4674d3
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x34]
mov dword [edx], eax
mov ecx, dword [ebp - 0x30]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x2c]
mov dword [edx + 8], eax
mov eax, dword [ebp + 8]
jmp 0x4675e5
push 0
lea ecx, [ebp - 0x80]
push ecx
mov edx, dword [ebp - 0x7c]
push edx
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x88]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x467517
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x34], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x34]
mov dword [edx], eax
mov ecx, dword [ebp - 0x30]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x2c]
mov dword [edx + 8], eax
mov eax, dword [ebp + 8]
jmp 0x4675e5
mov ecx, dword [ebp - 0x38]
sub ecx, dword [ebp + 0x10]
add ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x80]
cmp edx, dword [ebp - 0x7c]
jae 0x467547
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x34]
mov dword [eax], ecx
mov edx, dword [ebp - 0x30]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 8], ecx
mov eax, dword [ebp + 8]
jmp 0x4675e5
movsx edx, byte [ebp - 0x3f]
cmp edx, 0xa
jne 0x4675c9
mov eax, 0xd
mov word [ebp - 0x6c], ax
push 0
lea ecx, [ebp - 0x80]
push ecx
push 1
lea edx, [ebp - 0x6c]
push edx
mov eax, dword [ebp - 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x467598
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x34]
mov dword [ecx], edx
mov eax, dword [ebp - 0x30]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x2c]
mov dword [ecx + 8], edx
mov eax, dword [ebp + 8]
jmp 0x4675e5
cmp dword [ebp - 0x80], 1
jae 0x4675b7
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x34]
mov dword [eax], ecx
mov edx, dword [ebp - 0x30]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 8], ecx
mov eax, dword [ebp + 8]
jmp 0x4675e5
mov edx, dword [ebp - 0x2c]
add edx, 1
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x30]
add eax, 1
mov dword [ebp - 0x30], eax
jmp 0x466dbc
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x34]
mov dword [ecx], edx
mov eax, dword [ebp - 0x30]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x2c]
mov dword [ecx + 8], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00402bd0
mov esp, ebp
pop ebp
ret