Function at 0x1002b2b0
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003b2f0
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x10058010]
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 + 0x100592f0]
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.10010af0
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x78]
mov ecx, dword [eax]
cmp dword [ecx + 8], 0xfde9
jne 0x1002b331
mov byte [ebp - 0x3d], 1
jmp 0x1002b335
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 0x1002bb5e
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 0x1002b7ab
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 + 0x100592f0]
mov dl, byte [ecx + eax + 0x2d]
shr dl, 2
and dl, 1
movzx eax, dl
test eax, eax
je 0x1002b3c5
push str.__dbcsBufferUsed_fh_
push 0x1003c250
push 0
push 0x94
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.10009bc0
add esp, 0x18
cmp eax, 1
jne 0x1002b3c5
int3
mov dword [ebp - 0xa8], 5
mov dword [ebp - 0x3c], 0
jmp 0x1002b3e1
mov edx, dword [ebp - 0x3c]
add edx, 1
mov dword [ebp - 0x3c], edx
cmp dword [ebp - 0x3c], 5
jge 0x1002b40d
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 + 0x100592f0]
add eax, edx
mov ecx, dword [ebp - 0x3c]
movsx edx, byte [eax + ecx + 0x2e]
test edx, edx
je 0x1002b40d
jmp 0x1002b3d8
cmp dword [ebp - 0x3c], 0
jle 0x1002b66f
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 + 0x100592f0]
add eax, edx
mov ecx, 1
imul edx, ecx, 0
movzx eax, byte [eax + edx + 0x2e]
push eax
call fcn.1002c450
add esp, 4
movsx ecx, al
add ecx, 1
mov dword [ebp - 0x64], ecx
cmp dword [ebp - 0x64], 1
jle 0x1002b45c
mov edx, dword [ebp - 0x3c]
cmp edx, dword [ebp - 0x64]
jl 0x1002b482
push str.1___mb_len__mb_buf_used___mb_len
push 0x1003c250
push 0
push 0x9d
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.10009bc0
add esp, 0x18
cmp eax, 1
jne 0x1002b482
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 0x1002b5c7
mov dword [ebp - 0x48], 0
jmp 0x1002b4b2
mov eax, dword [ebp - 0x48]
add eax, 1
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
cmp ecx, dword [ebp - 0x3c]
jge 0x1002b4e0
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 + 0x100592f0]
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x48]
mov cl, byte [ecx + eax + 0x2e]
mov byte [ebp + edx - 0x18], cl
jmp 0x1002b4a9
mov dword [ebp - 0x4c], 0
jmp 0x1002b4f2
mov edx, dword [ebp - 0x4c]
add edx, 1
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x84]
jge 0x1002b511
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 0x1002b4e9
mov dword [ebp - 0x68], 0
jmp 0x1002b523
mov ecx, dword [ebp - 0x68]
add ecx, 1
mov dword [ebp - 0x68], ecx
mov edx, dword [ebp - 0x68]
cmp edx, dword [ebp - 0x3c]
jge 0x1002b54b
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 + 0x100592f0]
mov eax, dword [ebp - 0x68]
mov byte [edx + eax + 0x2e], 0
jmp 0x1002b51a
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 0x1002b56f
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.1002fb60
add esp, 0x14
cmp eax, 0xffffffff
jne 0x1002b5b2
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 0x1002bb75
mov ecx, dword [ebp - 0x84]
mov edx, dword [ebp - 0x38]
lea eax, [edx + ecx - 1]
mov dword [ebp - 0x38], eax
jmp 0x1002b66a
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 0x1002b601
push str.mb_buf_used__bytes_to_add___mb_buf_size
push 0x1003c250
push 0
push 0xc3
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.10009bc0
add esp, 0x18
cmp eax, 1
jne 0x1002b601
int3
mov dword [ebp - 0x50], 0
jmp 0x1002b613
mov ecx, dword [ebp - 0x50]
add ecx, 1
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
cmp edx, dword [ebp - 0x70]
jge 0x1002b645
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 + 0x100592f0]
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 0x1002b60a
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 0x1002bb75
jmp 0x1002b7a6
lfence
mov edx, dword [ebp - 0x38]
movzx eax, byte [edx]
push eax
call fcn.1002c450
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 0x1002b714
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 0x1002b6bf
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.1002fb60
add esp, 0x14
cmp eax, 0xffffffff
jne 0x1002b702
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 0x1002bb75
mov ecx, dword [ebp - 0x74]
mov edx, dword [ebp - 0x38]
lea eax, [edx + ecx - 1]
mov dword [ebp - 0x38], eax
jmp 0x1002b7a6
cmp dword [ebp - 0x60], 5
jbe 0x1002b740
push str.available_bytes___sizeof__mbBuffer_fh__
push 0x1003c250
push 0
push 0xe3
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.10009bc0
add esp, 0x18
cmp eax, 1
jne 0x1002b740
int3
mov dword [ebp - 0x54], 0
jmp 0x1002b752
mov edx, dword [ebp - 0x54]
add edx, 1
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x54]
cmp eax, dword [ebp - 0x60]
jge 0x1002b781
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 + 0x100592f0]
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 0x1002b749
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 0x1002bb75
jmp 0x1002ba12
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 + 0x100592f0]
mov al, byte [edx + ecx + 0x2d]
shr al, 2
and al, 1
movzx ecx, al
test ecx, ecx
je 0x1002b8e5
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 + 0x100592f0]
add eax, edx
mov ecx, 1
imul edx, ecx, 0
movzx eax, byte [eax + edx + 0x2e]
push eax
call fcn.100234f0
add esp, 8
movzx ecx, ax
test ecx, ecx
jne 0x1002b834
push str._isleadbyte_fast_internal__dbcsBuffer_fh___locale_
push 0x1003c250
push 0
push 0xf2
push str.minkernelcrtsucrt_src_appcrtlowiowrite.cpp
push 2
call fcn.10009bc0
add esp, 0x18
cmp eax, 1
jne 0x1002b834
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 + 0x100592f0]
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 + 0x100592f0]
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 + 0x100592f0]
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.10023510
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1002b8e0
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 0x1002bb75
jmp 0x1002ba12
lfence
mov ecx, dword [ebp - 0x78]
push ecx
mov edx, dword [ebp - 0x38]
movzx eax, byte [edx]
push eax
call fcn.100234f0
add esp, 8
movzx ecx, ax
test ecx, ecx
je 0x1002b9db
mov edx, dword [ebp - 0x38]
add edx, 1
cmp edx, dword [ebp - 0x58]
jae 0x1002b956
mov eax, dword [ebp + 0x18]
push eax
push 2
mov ecx, dword [ebp - 0x38]
push ecx
lea edx, [ebp - 0x44]
push edx
call fcn.10023510
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1002b948
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 0x1002bb75
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
jmp 0x1002b9d9
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 + 0x100592f0]
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 + 0x100592f0]
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 + 0x100592f0]
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 0x1002bb75
jmp 0x1002ba12
mov ecx, dword [ebp + 0x18]
push ecx
push 1
mov edx, dword [ebp - 0x38]
push edx
lea eax, [ebp - 0x44]
push eax
call fcn.10023510
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1002ba12
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 0x1002bb75
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.10026880
add esp, 0x20
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0
jne 0x1002ba63
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 0x1002bb75
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 0x1002baa7
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 0x1002bb75
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 0x1002bad7
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 0x1002bb75
movsx edx, byte [ebp - 0x3f]
cmp edx, 0xa
jne 0x1002bb59
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 0x1002bb28
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 0x1002bb75
cmp dword [ebp - 0x80], 1
jae 0x1002bb47
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 0x1002bb75
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 0x1002b34c
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.100036c0
mov esp, ebp
pop ebp
ret