Function at 0x1000b860
Capabilities:
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x2024
call fcn.102394a0
mov ebx, edx
mov esi, ecx
push 0xfffffffffffffff4
call sub.KERNEL32.dll_GetStdHandle
test eax, eax
je 0x1000b88b
mov edi, eax
cmp eax, 0xffffffff
jne 0x1000b8ab
call sub.KERNEL32.dll_GetLastError
jmp 0x1000b890
mov eax, 6
mov dword [esi + 8], eax
mov dword [esi + 4], 0
mov dword [esi], 1
add esp, 0x2024
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebp, dword [esp + 0x2038]
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push edi
call sub.KERNEL32.dll_GetConsoleMode
test eax, eax
je 0x1000b930
cmp ebp, 0x1000
mov eax, 0x1000
lea ecx, [esp + 0xc]
mov edx, ebx
cmovb eax, ebp
push eax
call fcn.10003e80
add esp, 4
cmp dword [esp + 0xc], 1
jne 0x1000b95c
cmp dword [esp + 0x10], 0
je 0x1000bbd0
mov eax, dword [esp + 0x10]
cmp eax, ebp
ja 0x1000bc0f
mov dword [esp + 8], edi
mov dword [esp + 4], esi
lea ecx, [esp + 0x24]
mov edx, ebx
push eax
call fcn.10003e80
add esp, 4
cmp dword [esp + 0x24], 1
je 0x1000bc1a
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
jmp 0x1000b96c
mov dword [esp + 0x24], 0
lea eax, [esp + 0x24]
push 0
push eax
push ebp
push ebx
push edi
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x1000bbb7
mov ecx, dword [esp + 0x24]
xor eax, eax
xor edx, edx
jmp 0x1000bbc3
mov dword [esp + 8], edi
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov dword [esp + 4], esi
lea eax, [esp + 0x24]
push 0x2000
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov esi, ebx
xor edx, edx
mov ecx, 0x2000
xor ebp, ebp
mov dword [esp + 0x18], edi
add esi, edi
mov dword [esp], esi
test dx, dx
je 0x1000b9b0
nop dword [eax]
xor eax, eax
test ecx, ecx
jne 0x1000ba90
jmp 0x1000baa9
cmp ebx, esi
je 0x1000bab0
mov al, byte [ebx]
lea esi, [ebx + 1]
movzx edx, al
test al, al
js 0x1000b9d8
mov ebx, esi
mov esi, dword [esp]
xor eax, eax
test ecx, ecx
jne 0x1000ba90
jmp 0x1000baa9
mov edi, dword [esp]
cmp esi, edi
je 0x1000b9eb
movzx esi, byte [ebx + 1]
add ebx, 2
and esi, 0x3f
jmp 0x1000b9ef
xor esi, esi
mov ebx, edi
and edx, 0x1f
cmp al, 0xdf
jbe 0x1000ba06
mov edi, dword [esp]
cmp ebx, edi
je 0x1000ba0f
movzx edi, byte [ebx]
inc ebx
and edi, 0x3f
jmp 0x1000ba13
shl edx, 6
mov edi, dword [esp + 0x18]
jmp 0x1000ba31
mov ebx, edi
xor edi, edi
shl esi, 6
or esi, edi
mov edi, dword [esp + 0x18]
cmp al, 0xf0
jb 0x1000ba2e
cmp ebx, dword [esp]
je 0x1000ba38
movzx eax, byte [ebx]
inc ebx
and eax, 0x3f
jmp 0x1000ba3a
shl edx, 0xc
or edx, esi
mov esi, dword [esp]
jmp 0x1000ba54
xor eax, eax
and edx, 7
shl esi, 6
shl edx, 0x12
or esi, edx
or esi, eax
cmp esi, 0x110000
mov edx, esi
mov esi, dword [esp]
je 0x1000bab0
cmp edx, 0xffff
jbe 0x1000b9a0
add edx, 0xffff0000
mov esi, edx
and edx, 0x3ff
shr esi, 0xa
or edx, 0xdc00
or esi, 0xd800
mov eax, edx
mov edx, esi
mov esi, dword [esp]
test ecx, ecx
je 0x1000baa9
nop dword [eax + eax]
mov word [esp + ebp*2 + 0x24], dx
inc ebp
add ecx, 0xfffffffe
mov edx, eax
test dx, dx
jne 0x1000b9a0
jmp 0x1000b9b0
mov ebp, 0x1000
jmp 0x1000babc
cmp ebp, 0x1001
jae 0x1000bc49
lea eax, [esp + 0x24]
mov dword [esp + 0xc], 0
push 0
lea ecx, [esp + 0x10]
push ecx
push ebp
push eax
push dword [esp + 0x18]
call sub.KERNEL32.dll_WriteConsoleW
test eax, eax
je 0x1000bb99
mov ebx, dword [esp + 0xc]
lea edx, [esp + 0x24]
cmp ebx, ebp
je 0x1000bbfd
jae 0x1000bc57
movzx eax, word [esp + ebx*2 + 0x24]
mov ecx, dword [esp + 8]
add eax, 0x2312
movzx eax, ax
cmp eax, 0x311
ja 0x1000bb3a
lea eax, [esp + ebx*2 + 0x24]
inc ebx
mov dword [esp + 0xc], 0
push 0
lea edx, [esp + 0x10]
push edx
push 1
push eax
push ecx
call sub.KERNEL32.dll_WriteConsoleW
test eax, eax
jne 0x1000bb36
call sub.KERNEL32.dll_GetLastError
lea edx, [esp + 0x24]
cmp ebp, ebx
jb 0x1000bc6a
test ebx, ebx
je 0x1000bbfb
add ebx, ebx
xor edi, edi
jmp 0x1000bb5e
add edi, ecx
add edx, 2
add ebx, 0xfffffffe
je 0x1000bbfd
movzx eax, word [edx]
mov ecx, 1
cmp eax, 0x80
jb 0x1000bb50
mov esi, edx
movzx edx, ax
mov ecx, 2
cmp edx, 0x800
mov edx, esi
jb 0x1000bb50
add eax, 0x2312
xor ecx, ecx
movzx eax, ax
cmp eax, 0x311
seta cl
lea ecx, [ecx + ecx + 1]
jmp 0x1000bb50
call sub.KERNEL32.dll_GetLastError
mov ecx, dword [esp + 4]
mov dword [ecx + 8], eax
mov dword [ecx + 4], 0
mov dword [ecx], 1
jmp 0x1000b8a0
call sub.KERNEL32.dll_GetLastError
xor ecx, ecx
mov edx, 1
mov dword [esi], edx
mov dword [esi + 4], ecx
mov dword [esi + 8], eax
jmp 0x1000b8a0
lea ecx, [esp + 0x24]
mov edx, 0xc
push 0x4f
push str.Windows_stdio_in_console_mode_does_not_support_writing_non_UTF_8_byte_sequences
call fcn.1000b3e0
add esp, 8
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov dword [esi + 8], ecx
mov dword [esi + 4], eax
jmp 0x1000b89a
xor edi, edi
mov eax, dword [esp + 4]
mov dword [eax + 4], edi
mov dword [eax], 0
jmp 0x1000b8a0
mov ecx, eax
mov edx, ebp
push 0x102ce2e0
jmp 0x1000bc73
movsd xmm0, qword [esp + 0x28]
lea eax, [esp + 0x1c]
mov ecx, str.called__Result::unwrap____on_an__Err__value_.Overflow
mov edx, 0x2b
movsd qword [esp + 0x1c], xmm0
push 0x102ce300
push 0x102ce2f0
push eax
call fcn.10003080
add esp, 0xc
ud2
mov ecx, ebp
mov edx, 0x1000
push 0x102ce310
jmp 0x1000bc73
mov ecx, ebx
mov edx, ebp
push 0x102ce330
call fcn.100016c0
add esp, 4
ud2
mov ecx, ebx
mov edx, ebp
push 0x102ce320
call fcn.10001b60
add esp, 4
ud2