Function at 0x467380
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x38
mov ebx, dword [ebp + 0xc]
mov esi, ecx
test ebx, ebx
je 0x4673aa
push edx
call sub.kernel32.dll_GetStdHandle
test eax, eax
je 0x4673b6
mov edi, eax
cmp eax, 0xffffffff
jne 0x4673c9
call sub.kernel32.dll_GetLastError
jmp 0x4673bb
mov dword [esi + 4], 0
mov byte [esi], 4
jmp 0x4673c1
mov eax, 6
mov byte [esi], 0
mov dword [esi + 4], eax
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x2c], 0
lea eax, [ebp - 0x2c]
push eax
push edi
call sub.kernel32.dll_GetConsoleMode
test eax, eax
je 0x46743a
mov ecx, dword [ebp + 0x10]
movzx eax, byte [ecx + 4]
test eax, eax
je 0x467488
mov ebx, ecx
mov ecx, dword [ebp + 8]
cmp al, 4
jae 0x4675ed
movzx ecx, byte [ecx]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x4674da
mov byte [ebx + eax], cl
mov edx, ebx
movzx ecx, byte [ebx + 4]
inc cl
mov byte [ebx + 4], cl
movzx eax, byte [ebx]
movzx ebx, byte [eax + 0x504468]
cmp cl, bl
mov dword [ebp - 0x44], ebx
jae 0x4674f5
mov dword [esi + 4], 1
mov byte [esi], 4
jmp 0x4673c1
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0x103
lea eax, [ebp - 0x14]
push 0
push 0
push ebx
push dword [ebp + 8]
push eax
push 0
push 0
push 0
push edi
call sub.ntdll.dll_NtWriteFile
cmp eax, 0x103
jne 0x46747d
push 0xffffffffffffffff
push edi
call sub.kernel32.dll_WaitForSingleObject
mov eax, dword [ebp - 0x14]
cmp eax, 0x103
je 0x46761d
test eax, eax
js 0x4674e0
mov eax, dword [ebp - 0x10]
mov bl, 4
jmp 0x4674e8
cmp ebx, 0x1000
mov eax, 0x1000
cmovb eax, ebx
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x38]
push eax
call fcn.00410820
add esp, 4
cmp dword [ebp - 0x38], 0
je 0x467529
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x467542
mov edx, dword [ebp + 8]
cmp eax, ebx
ja 0x467681
lea ebx, [ebp - 0x2c]
mov ecx, ebx
push eax
call fcn.00410820
add esp, 4
mov ecx, ebx
call 0x467a70
mov ebx, edx
jmp 0x46752f
mov byte [ebx + 4], 0
jmp 0x46751a
xor ebx, ebx
push eax
call sub.ntdll.dll_RtlNtStatusToDosError
movzx ecx, bl
mov dword [esi + 4], eax
mov dword [esi], ecx
jmp 0x4673c1
movzx eax, cl
cmp cl, 5
jae 0x467670
lea ecx, [ebp - 0x38]
push eax
call fcn.00410820
add esp, 4
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x38], 0
mov byte [eax + 4], 0
je 0x467571
mov byte [esi], 2
mov dword [esi + 4], 0x5045b8
jmp 0x4673c1
mov eax, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x30]
mov ecx, esi
mov edx, edi
push ebx
push eax
call 0x4676c0
add esp, 8
jmp 0x4673c1
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
movzx ecx, byte [eax + 0x504468]
cmp ecx, 2
jb 0x4675c1
cmp ecx, ebx
jbe 0x4675c1
mov ecx, dword [ebp + 0x10]
mov dword [esi + 4], 1
mov byte [ecx], al
mov byte [ecx + 4], 1
mov cl, 4
mov byte [esi], cl
jmp 0x4673c1
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
cmp ecx, ebx
mov dword [ebp - 0x14], ecx
jne 0x46768f
lea ecx, [ebp - 0x2c]
mov edx, edi
push ebx
push eax
call 0x4676c0
add esp, 8
movzx eax, byte [ebp - 0x2c]
cmp al, 4
jne 0x4675d1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x14], ebx
cmp eax, ebx
mov dword [ebp - 0x40], eax
je 0x46742e
mov dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x40]
lea edx, [ebp - 0x14]
push 0x504658
jmp 0x4676a1
mov al, 2
mov dword [esi + 4], 0x5045b8
mov byte [esi], al
jmp 0x4673c1
movzx ecx, byte [ebp - 0x29]
movzx edi, word [ebp - 0x2b]
mov edx, dword [ebp - 0x28]
mov byte [esi + 3], cl
mov word [esi + 1], di
mov byte [esi], al
mov dword [esi + 4], edx
jmp 0x4673c1
mov dword [ebp - 0x2c], 0x504620
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], str.combase.dll
mov dword [ebp - 0x20], 0
lea ecx, [ebp - 0x2c]
mov edx, 0x504628
call fcn.0040cbc0
lea eax, [ebp - 0x44]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x2c], 0x504278
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x3c], 0
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 0
lea edx, [ebp - 0x40]
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x38]
push eax
call fcn.00465eb0
add esp, 4
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
call fcn.00465f80
mov ecx, 7
int 0x29
ud2
mov ecx, eax
mov edx, 4
push 0x504638
call fcn.0040d890
mov ecx, eax
mov edx, ebx
push 0x5045c4
call fcn.0040d890
mov dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x44]
lea edx, [ebp - 0x14]
push 0x504648
lea eax, [ebp - 0x2c]
push eax
call fcn.00466cf0
mov esi, eax
push edi
call sub.kernel32.dll_CloseHandle
push esi
call fcn.004a1fc0
nop dword [eax + eax]
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
mov eax, 0x2050
call fcn.004a4fc0
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [esp + 0x20], edx
mov dword [esp], ecx
cmp ebx, 0x1001
jb 0x467716
cmp byte [eax + 0x1000], 0xbf
mov ebx, 0x1000
jg 0x467716
cmp byte [eax + 0xfff], 0xbf
mov ebx, 0xfff
jg 0x467716
xor ebx, ebx
cmp byte [eax + 0xffe], 0xc0
setge bl
add ebx, 0xffd
lea edi, [esp + 0x4c]
push 0x1000
push edi
push ebx
push eax
push 8
push 0xfde9
call sub.kernel32.dll_MultiByteToWideChar
test eax, eax
je 0x467a1d
mov esi, eax
cmp eax, 0x1001
jae 0x467a53
mov dword [esp + 8], 0
lea eax, [esp + 8]
push 0
push eax
push esi
push edi
push dword [esp + 0x30]
call sub.kernel32.dll_WriteConsoleW
test eax, eax
je 0x4679d3
mov ecx, dword [esp + 8]
cmp ecx, esi
je 0x4679e5
jae 0x467a11
movzx eax, word [esp + ecx*2 + 0x4c]
add eax, 0x2312
movzx eax, ax
cmp eax, 0x312
jae 0x4677b7
lea eax, [esp + ecx*2 + 0x4c]
inc ecx
mov dword [esp + 8], 0
mov ebx, ecx
push 0
lea ecx, [esp + 0xc]
push ecx
push 1
push eax
push dword [esp + 0x30]
call sub.kernel32.dll_WriteConsoleW
test eax, eax
je 0x4679f6
mov ecx, ebx
cmp ecx, esi
ja 0x467a05
test ecx, ecx
je 0x4679e3
lea eax, [ecx - 1]
xor ebx, ebx
and eax, 0x7fffffff
cmp eax, 6
jbe 0x46797f
inc eax
mov dword [esp + 4], ecx
pxor xmm0, xmm0
lea esi, [esp + 0x54]
pxor xmm1, xmm1
mov edx, eax
and edx, 0x7ffffff8
lea ecx, [edx + edx]
mov edi, edx
nop dword [eax + eax]
movq xmm2, qword [esi]
movdqa xmmword [esp + 0x30], xmm1
movq xmm1, qword [esi - 8]
movdqa xmm3, xmmword [0x4ac840]
movdqa xmmword [esp + 0x20], xmm0
add esi, 0x10
add edi, 0xfffffff8
movdqa xmm0, xmm1
movdqa xmm5, xmm2
movdqa xmm7, xmm1
movdqa xmm4, xmm2
paddw xmm5, xmm3
paddw xmm0, xmm3
movdqa xmm3, xmmword [0x4ac820]
pxor xmm4, xmmword [0x4ac820]
pxor xmm5, xmmword [0x4ac820]
pxor xmm0, xmm3
movdqa xmm3, xmmword [0x4ac850]
pcmpgtw xmm4, xmmword [0x4ac830]
movdqa xmm6, xmm3
pcmpgtw xmm3, xmm5
movdqa xmm5, xmmword [0x4ac860]
punpcklwd xmm4, xmm4
pcmpgtw xmm6, xmm0
punpcklwd xmm3, xmm3
punpcklwd xmm6, xmm6
movdqa xmm0, xmm6
pandn xmm0, xmm5
movdqa xmm5, xmmword [0x4ac870]
pand xmm6, xmm5
por xmm6, xmm0
movdqa xmm0, xmm3
pand xmm3, xmm5
movdqa xmm5, xmmword [0x4ac820]
pandn xmm0, xmmword [0x4ac860]
pxor xmm7, xmm5
por xmm3, xmm0
movdqa xmm0, xmmword [0x4ac880]
pand xmm3, xmm4
paddw xmm1, xmm0
paddw xmm2, xmm0
movdqa xmm0, xmmword [0x4ac890]
pxor xmm1, xmmword [0x4ac820]
pxor xmm2, xmm5
pcmpeqd xmm5, xmm5
pcmpgtw xmm0, xmm1
movdqa xmm1, xmmword [0x4ac890]
punpcklwd xmm0, xmm0
pcmpgtw xmm1, xmm2
movdqa xmm2, xmmword [0x4ac830]
pcmpgtw xmm7, xmm2
movdqa xmm2, xmmword [0x4ac870]
punpcklwd xmm7, xmm7
pand xmm6, xmm7
pand xmm0, xmm2
psubd xmm0, xmm5
pandn xmm7, xmm0
movdqa xmm0, xmmword [esp + 0x20]
por xmm7, xmm6
paddd xmm0, xmm7
punpcklwd xmm1, xmm1
pand xmm1, xmm2
psubd xmm1, xmm5
pandn xmm4, xmm1
movdqa xmm1, xmmword [esp + 0x30]
por xmm4, xmm3
paddd xmm1, xmm4
jne 0x467800
paddd xmm1, xmm0
cmp eax, edx
pshufd xmm0, xmm1, 0xee
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd ebx, xmm1
je 0x4679e5
lea edi, [esp + ecx + 0x4c]
mov ecx, dword [esp + 4]
lea eax, [esp + ecx*2 + 0x4c]
jmp 0x467999
add edi, 2
add ebx, edx
cmp edi, eax
je 0x4679e5
movzx ecx, word [edi]
mov edx, 1
cmp ecx, 0x80
jb 0x467990
movzx esi, cx
mov edx, 2
cmp esi, 0x800
jb 0x467990
add ecx, 0x2312
xor edx, edx
movzx ecx, cx
cmp ecx, 0x312
setae dl
lea edx, [edx + edx + 1]
jmp 0x467990
call sub.kernel32.dll_GetLastError
mov ecx, dword [esp]
mov byte [ecx], 0
mov dword [ecx + 4], eax
jmp 0x4679ee
xor ebx, ebx
mov eax, dword [esp]
mov dword [eax + 4], ebx
mov byte [eax], 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call sub.kernel32.dll_GetLastError
mov ecx, ebx
cmp ecx, esi
jbe 0x4677bf
mov edx, esi
push 0x5046c8
call fcn.0040d890
mov edx, esi
push 0x5046b8
call fcn.0040cf20
lea ecx, [esp + 8]
mov edx, 0x504698
mov dword [esp + 8], 0x504690
mov dword [esp + 0xc], 1
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], str.combase.dll
mov dword [esp + 0x14], 0
call fcn.0040cbc0
mov ecx, esi
mov edx, 0x1000
push 0x5046a8
call fcn.0040d890
nop word cs:[eax + eax]
nop
cmp dword [ecx], 0
jne 0x467a7c
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 8]
ret
push ebp
mov ebp, esp
sub esp, 8
movsd xmm0, qword [ecx + 4]
lea eax, [ebp - 8]
mov ecx, str.called__Result::unwrap____on_an__Err__value
mov edx, 0x2b
movsd qword [ebp - 8], xmm0
push 0x5045d4
push 0x502910
push eax
call fcn.00410e30
nop dword [eax]
push ebp
mov ebp, esp
push esi
push eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
lea esi, [ebp - 8]
lea edx, [eax + 4]
mov dword [ebp - 8], edx
mov edx, str.Utf8Errorvalid_up_toerror_len
push 0x502db4
push esi
push 9
push 0x502da8
push 0x502d74
push eax
push 0xb
push 0x502d9d
push 9
call fcn.00411dd0
add esp, 0x28
pop esi
pop ebp
ret