Function at 0x1026c230
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x103b9e70
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x106a6100]
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 + 0x106b1350]
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.1020d040
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x78]
mov ecx, dword [eax]
cmp dword [ecx + 8], 0xfde9
jne 0x1026c2b1
mov byte [ebp - 0x3d], 1
jmp 0x1026c2b5
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 0x1026cade
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 0x1026c72b
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 + 0x106b1350]
mov dl, byte [ecx + eax + 0x2d]
shr dl, 2
and dl, 1
movzx eax, dl
test eax, eax
je 0x1026c345
push str.__dbcsBufferUsed_fh_
push 0x103c2d3c
push 0
push 0x94
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.1020b000
add esp, 0x18
cmp eax, 1
jne 0x1026c345
int3
mov dword [ebp - 0xa8], 5
mov dword [ebp - 0x3c], 0
jmp 0x1026c361
mov edx, dword [ebp - 0x3c]
add edx, 1
mov dword [ebp - 0x3c], edx
cmp dword [ebp - 0x3c], 5
jge 0x1026c38d
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 + 0x106b1350]
add eax, edx
mov ecx, dword [ebp - 0x3c]
movsx edx, byte [eax + ecx + 0x2e]
test edx, edx
je 0x1026c38d
jmp 0x1026c358
cmp dword [ebp - 0x3c], 0
jle 0x1026c5ef
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 + 0x106b1350]
add eax, edx
mov ecx, 1
imul edx, ecx, 0
movzx eax, byte [eax + edx + 0x2e]
push eax
call fcn.1026d3d0
add esp, 4
movsx ecx, al
add ecx, 1
mov dword [ebp - 0x64], ecx
cmp dword [ebp - 0x64], 1
jle 0x1026c3dc
mov edx, dword [ebp - 0x3c]
cmp edx, dword [ebp - 0x64]
jl 0x1026c402
push str.1___mb_len__mb_buf_used___mb_len
push 0x103c2d3c
push 0
push 0x9d
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.1020b000
add esp, 0x18
cmp eax, 1
jne 0x1026c402
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 0x1026c547
mov dword [ebp - 0x48], 0
jmp 0x1026c432
mov eax, dword [ebp - 0x48]
add eax, 1
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
cmp ecx, dword [ebp - 0x3c]
jge 0x1026c460
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 + 0x106b1350]
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x48]
mov cl, byte [ecx + eax + 0x2e]
mov byte [ebp + edx - 0x18], cl
jmp 0x1026c429
mov dword [ebp - 0x4c], 0
jmp 0x1026c472
mov edx, dword [ebp - 0x4c]
add edx, 1
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x84]
jge 0x1026c491
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 0x1026c469
mov dword [ebp - 0x68], 0
jmp 0x1026c4a3
mov ecx, dword [ebp - 0x68]
add ecx, 1
mov dword [ebp - 0x68], ecx
mov edx, dword [ebp - 0x68]
cmp edx, dword [ebp - 0x3c]
jge 0x1026c4cb
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 + 0x106b1350]
mov eax, dword [ebp - 0x68]
mov byte [edx + eax + 0x2e], 0
jmp 0x1026c49a
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 0x1026c4ef
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.10289700
add esp, 0x14
cmp eax, 0xffffffff
jne 0x1026c532
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 0x1026caf5
mov ecx, dword [ebp - 0x84]
mov edx, dword [ebp - 0x38]
lea eax, [edx + ecx - 1]
mov dword [ebp - 0x38], eax
jmp 0x1026c5ea
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 0x1026c581
push str.mb_buf_used__bytes_to_add___mb_buf_size
push 0x103c2d3c
push 0
push 0xc3
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.1020b000
add esp, 0x18
cmp eax, 1
jne 0x1026c581
int3
mov dword [ebp - 0x50], 0
jmp 0x1026c593
mov ecx, dword [ebp - 0x50]
add ecx, 1
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
cmp edx, dword [ebp - 0x70]
jge 0x1026c5c5
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 + 0x106b1350]
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 0x1026c58a
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 0x1026caf5
jmp 0x1026c726
lfence
mov edx, dword [ebp - 0x38]
movzx eax, byte [edx]
push eax
call fcn.1026d3d0
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 0x1026c694
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 0x1026c63f
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.10289700
add esp, 0x14
cmp eax, 0xffffffff
jne 0x1026c682
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 0x1026caf5
mov ecx, dword [ebp - 0x74]
mov edx, dword [ebp - 0x38]
lea eax, [edx + ecx - 1]
mov dword [ebp - 0x38], eax
jmp 0x1026c726
cmp dword [ebp - 0x60], 5
jbe 0x1026c6c0
push str.available_bytes___sizeof__mbBuffer_fh__
push 0x103c2d3c
push 0
push 0xe3
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.1020b000
add esp, 0x18
cmp eax, 1
jne 0x1026c6c0
int3
mov dword [ebp - 0x54], 0
jmp 0x1026c6d2
mov edx, dword [ebp - 0x54]
add edx, 1
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x54]
cmp eax, dword [ebp - 0x60]
jge 0x1026c701
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 + 0x106b1350]
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 0x1026c6c9
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 0x1026caf5
jmp 0x1026c992
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 + 0x106b1350]
mov al, byte [edx + ecx + 0x2d]
shr al, 2
and al, 1
movzx ecx, al
test ecx, ecx
je 0x1026c865
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 + 0x106b1350]
add eax, edx
mov ecx, 1
imul edx, ecx, 0
movzx eax, byte [eax + edx + 0x2e]
push eax
call fcn.10250c20
add esp, 8
movzx ecx, ax
test ecx, ecx
jne 0x1026c7b4
push str._isleadbyte_fast_internal__dbcsBuffer_fh___locale_
push 0x103c2d3c
push 0
push 0xf2
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.1020b000
add esp, 0x18
cmp eax, 1
jne 0x1026c7b4
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 + 0x106b1350]
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 + 0x106b1350]
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 + 0x106b1350]
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.10269310
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1026c860
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 0x1026caf5
jmp 0x1026c992
lfence
mov ecx, dword [ebp - 0x78]
push ecx
mov edx, dword [ebp - 0x38]
movzx eax, byte [edx]
push eax
call fcn.10250c20
add esp, 8
movzx ecx, ax
test ecx, ecx
je 0x1026c95b
mov edx, dword [ebp - 0x38]
add edx, 1
cmp edx, dword [ebp - 0x58]
jae 0x1026c8d6
mov eax, dword [ebp + 0x18]
push eax
push 2
mov ecx, dword [ebp - 0x38]
push ecx
lea edx, [ebp - 0x44]
push edx
call fcn.10269310
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1026c8c8
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 0x1026caf5
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
jmp 0x1026c959
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 + 0x106b1350]
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 + 0x106b1350]
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 + 0x106b1350]
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 0x1026caf5
jmp 0x1026c992
mov ecx, dword [ebp + 0x18]
push ecx
push 1
mov edx, dword [ebp - 0x38]
push edx
lea eax, [ebp - 0x44]
push eax
call fcn.10269310
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1026c992
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 0x1026caf5
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.10274290
add esp, 0x20
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0
jne 0x1026c9e3
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 0x1026caf5
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 0x1026ca27
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 0x1026caf5
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 0x1026ca57
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 0x1026caf5
movsx edx, byte [ebp - 0x3f]
cmp edx, 0xa
jne 0x1026cad9
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 0x1026caa8
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 0x1026caf5
cmp dword [ebp - 0x80], 1
jae 0x1026cac7
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 0x1026caf5
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 0x1026c2cc
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.101f5040
mov esp, ebp
pop ebp
ret