Function at 0x4759b0
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48eee0
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x4b1024]
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 + 0x4b2958]
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.0042f4d0
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x78]
mov ecx, dword [eax]
cmp dword [ecx + 8], 0xfde9
jne 0x475a31
mov byte [ebp - 0x3d], 1
jmp 0x475a35
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 0x47625e
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 0x475eab
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 + 0x4b2958]
mov dl, byte [ecx + eax + 0x2d]
shr dl, 2
and dl, 1
movzx eax, dl
test eax, eax
je 0x475ac5
push str.__dbcsBufferUsed_fh_
push 0x491e58
push 0
push 0x94
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.00449c60
add esp, 0x18
cmp eax, 1
jne 0x475ac5
int3
mov dword [ebp - 0xa8], 5
mov dword [ebp - 0x3c], 0
jmp 0x475ae1
mov edx, dword [ebp - 0x3c]
add edx, 1
mov dword [ebp - 0x3c], edx
cmp dword [ebp - 0x3c], 5
jge 0x475b0d
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 + 0x4b2958]
add eax, edx
mov ecx, dword [ebp - 0x3c]
movsx edx, byte [eax + ecx + 0x2e]
test edx, edx
je 0x475b0d
jmp 0x475ad8
cmp dword [ebp - 0x3c], 0
jle 0x475d6f
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 + 0x4b2958]
add eax, edx
mov ecx, 1
imul edx, ecx, 0
movzx eax, byte [eax + edx + 0x2e]
push eax
call fcn.00476b50
add esp, 4
movsx ecx, al
add ecx, 1
mov dword [ebp - 0x64], ecx
cmp dword [ebp - 0x64], 1
jle 0x475b5c
mov edx, dword [ebp - 0x3c]
cmp edx, dword [ebp - 0x64]
jl 0x475b82
push str.1___mb_len__mb_buf_used___mb_len
push 0x491e58
push 0
push 0x9d
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.00449c60
add esp, 0x18
cmp eax, 1
jne 0x475b82
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 0x475cc7
mov dword [ebp - 0x48], 0
jmp 0x475bb2
mov eax, dword [ebp - 0x48]
add eax, 1
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
cmp ecx, dword [ebp - 0x3c]
jge 0x475be0
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 + 0x4b2958]
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x48]
mov cl, byte [ecx + eax + 0x2e]
mov byte [ebp + edx - 0x18], cl
jmp 0x475ba9
mov dword [ebp - 0x4c], 0
jmp 0x475bf2
mov edx, dword [ebp - 0x4c]
add edx, 1
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x84]
jge 0x475c11
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 0x475be9
mov dword [ebp - 0x68], 0
jmp 0x475c23
mov ecx, dword [ebp - 0x68]
add ecx, 1
mov dword [ebp - 0x68], ecx
mov edx, dword [ebp - 0x68]
cmp edx, dword [ebp - 0x3c]
jge 0x475c4b
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 + 0x4b2958]
mov eax, dword [ebp - 0x68]
mov byte [edx + eax + 0x2e], 0
jmp 0x475c1a
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 0x475c6f
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.0047c3a0
add esp, 0x14
cmp eax, 0xffffffff
jne 0x475cb2
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 0x476275
mov ecx, dword [ebp - 0x84]
mov edx, dword [ebp - 0x38]
lea eax, [edx + ecx - 1]
mov dword [ebp - 0x38], eax
jmp 0x475d6a
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 0x475d01
push str.mb_buf_used__bytes_to_add___mb_buf_size
push 0x491e58
push 0
push 0xc3
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.00449c60
add esp, 0x18
cmp eax, 1
jne 0x475d01
int3
mov dword [ebp - 0x50], 0
jmp 0x475d13
mov ecx, dword [ebp - 0x50]
add ecx, 1
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
cmp edx, dword [ebp - 0x70]
jge 0x475d45
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 + 0x4b2958]
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 0x475d0a
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 0x476275
jmp 0x475ea6
lfence
mov edx, dword [ebp - 0x38]
movzx eax, byte [edx]
push eax
call fcn.00476b50
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 0x475e14
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 0x475dbf
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.0047c3a0
add esp, 0x14
cmp eax, 0xffffffff
jne 0x475e02
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 0x476275
mov ecx, dword [ebp - 0x74]
mov edx, dword [ebp - 0x38]
lea eax, [edx + ecx - 1]
mov dword [ebp - 0x38], eax
jmp 0x475ea6
cmp dword [ebp - 0x60], 5
jbe 0x475e40
push str.available_bytes___sizeof__mbBuffer_fh__
push 0x491e58
push 0
push 0xe3
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.00449c60
add esp, 0x18
cmp eax, 1
jne 0x475e40
int3
mov dword [ebp - 0x54], 0
jmp 0x475e52
mov edx, dword [ebp - 0x54]
add edx, 1
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x54]
cmp eax, dword [ebp - 0x60]
jge 0x475e81
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 + 0x4b2958]
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 0x475e49
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 0x476275
jmp 0x476112
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 + 0x4b2958]
mov al, byte [edx + ecx + 0x2d]
shr al, 2
and al, 1
movzx ecx, al
test ecx, ecx
je 0x475fe5
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 + 0x4b2958]
add eax, edx
mov ecx, 1
imul edx, ecx, 0
movzx eax, byte [eax + edx + 0x2e]
push eax
call fcn.00463af0
add esp, 8
movzx ecx, ax
test ecx, ecx
jne 0x475f34
push str._isleadbyte_fast_internal__dbcsBuffer_fh___locale_
push 0x491e58
push 0
push 0xf2
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.00449c60
add esp, 0x18
cmp eax, 1
jne 0x475f34
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 + 0x4b2958]
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 + 0x4b2958]
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 + 0x4b2958]
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.00463b10
add esp, 0x10
cmp eax, 0xffffffff
jne 0x475fe0
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 0x476275
jmp 0x476112
lfence
mov ecx, dword [ebp - 0x78]
push ecx
mov edx, dword [ebp - 0x38]
movzx eax, byte [edx]
push eax
call fcn.00463af0
add esp, 8
movzx ecx, ax
test ecx, ecx
je 0x4760db
mov edx, dword [ebp - 0x38]
add edx, 1
cmp edx, dword [ebp - 0x58]
jae 0x476056
mov eax, dword [ebp + 0x18]
push eax
push 2
mov ecx, dword [ebp - 0x38]
push ecx
lea edx, [ebp - 0x44]
push edx
call fcn.00463b10
add esp, 0x10
cmp eax, 0xffffffff
jne 0x476048
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 0x476275
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
jmp 0x4760d9
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 + 0x4b2958]
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 + 0x4b2958]
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 + 0x4b2958]
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 0x476275
jmp 0x476112
mov ecx, dword [ebp + 0x18]
push ecx
push 1
mov edx, dword [ebp - 0x38]
push edx
lea eax, [ebp - 0x44]
push eax
call fcn.00463b10
add esp, 0x10
cmp eax, 0xffffffff
jne 0x476112
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 0x476275
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.0046bec0
add esp, 0x20
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0
jne 0x476163
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 0x476275
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 0x4761a7
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 0x476275
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 0x4761d7
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 0x476275
movsx edx, byte [ebp - 0x3f]
cmp edx, 0xa
jne 0x476259
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 0x476228
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 0x476275
cmp dword [ebp - 0x80], 1
jae 0x476247
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 0x476275
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 0x475a4c
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.00403a80
mov esp, ebp
pop ebp
ret