Function at 0x410340
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x68
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x4268d0
mov esi, ecx
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
test edi, edi
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
je 0x41038e
push edx
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x41039a
cmp eax, 0xffffffff
jne 0x4103c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x41039f
mov dword [esi + 4], 0
mov byte [esi], 4
jmp 0x4103af
mov eax, 6
mov byte [esi], 0
mov byte [esi + 3], 0
mov word [esi + 1], 0
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x68
pop esi
pop edi
pop ebx
pop ebp
ret
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], 0
push ecx
push eax
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x4104ad
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp + 0x10]
movzx eax, byte [ebx + 4]
test eax, eax
je 0x4104fd
mov ecx, dword [ebp + 8]
cmp al, 4
jae 0x4105d8
movzx ecx, byte [ecx]
mov edx, ecx
and dl, 0xc0
cmp dl, 0x80
jne 0x41054b
mov byte [ebx + eax], cl
mov edi, ebx
movzx ecx, byte [ebx + 4]
inc cl
mov byte [ebx + 4], cl
movzx eax, byte [ebx]
movzx ebx, byte [eax + 0x43b01c]
cmp cl, bl
mov dword [ebp - 0x74], ebx
jb 0x4105ad
movzx eax, cl
cmp cl, 5
jae 0x4106a0
lea ecx, [ebp - 0x68]
mov edx, edi
push eax
call fcn.00405740
add esp, 4
cmp dword [ebp - 0x68], 0
mov byte [edi + 4], 0
jne 0x41054f
mov ecx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x64]
cmp ecx, ebx
mov dword [ebp - 0x40], ecx
jne 0x4106c1
mov edx, dword [ebp - 0x20]
lea edi, [ebp - 0x38]
mov ecx, edi
push ebx
push eax
call fcn.00410ce0
add esp, 8
movzx eax, byte [ebp - 0x38]
cmp al, 4
jne 0x4105bc
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x40], ebx
cmp eax, ebx
mov dword [ebp - 0x50], eax
je 0x4105ad
lea ecx, [ebp - 0x50]
lea edx, [ebp - 0x40]
mov dword [ebp - 0x30], 0
push 0x43b13c
push edi
jmp 0x4106d7
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 0x103
mov dword [ebp - 0x44], 0
push 0
push 0
push edi
push dword [ebp + 8]
push eax
push 0
push 0
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtWriteFile]
cmp eax, 0x103
jne 0x4104f2
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x48]
cmp eax, 0x103
je 0x41060a
test eax, eax
js 0x410561
mov eax, dword [ebp - 0x44]
mov bl, 4
jmp 0x41056a
mov edx, dword [ebp + 8]
cmp edi, 0x1000
mov eax, 0x1000
lea ecx, [ebp - 0x68]
cmovb eax, edi
push eax
call fcn.00405740
add esp, 4
cmp dword [ebp - 0x68], 0
je 0x410577
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x410591
mov edx, dword [ebp + 8]
cmp eax, edi
ja 0x4106ae
lea edi, [ebp - 0x38]
mov ecx, edi
push eax
call fcn.00405740
add esp, 4
mov ecx, edi
call fcn.004110b0
mov edi, edx
jmp 0x41057d
mov byte [ebx + 4], 0
mov dword [esi], 2
mov dword [esi + 4], 0x43b010
jmp 0x4103af
xor ebx, ebx
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
movzx ecx, bl
mov dword [esi + 4], eax
mov dword [esi], ecx
jmp 0x4103af
mov eax, dword [ebp - 0x64]
mov edi, dword [ebp - 0x60]
mov edx, dword [ebp - 0x20]
mov ecx, esi
push edi
push eax
call fcn.00410ce0
add esp, 8
jmp 0x4103af
mov eax, dword [ebp + 8]
movzx eax, byte [eax]
movzx ecx, byte [eax + 0x43b01c]
cmp ecx, 2
jb 0x41054f
cmp ecx, edi
jbe 0x41054f
mov byte [ebx], al
mov byte [ebx + 4], 1
mov dword [esi + 4], 1
mov byte [esi], 4
jmp 0x4103af
movzx ecx, byte [ebp - 0x35]
movzx edi, word [ebp - 0x37]
mov edx, dword [ebp - 0x34]
mov byte [esi + 3], cl
mov word [esi + 1], di
mov byte [esi], al
mov dword [esi + 4], edx
jmp 0x4103af
lea ecx, [ebp - 0x38]
mov edx, 0x43afb0
mov dword [ebp - 0x30], 0x43afa8
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x28], str._rustc_90c541806f23a127002de5b4038be731ba1458calibrarycore_src_strpattern.rs
mov dword [ebp - 0x24], 0
call fcn.00435240
ud2
lea eax, [ebp - 0x38]
mov dword [ebp - 0x60], 0x4398d8
mov dword [ebp - 0x5c], 2
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x30], 0x43ab64
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x28], str._rustc_90c541806f23a127002de5b4038be731ba1458calibrarycore_src_strpattern.rs
mov dword [ebp - 0x20], ebx
mov byte [ebp - 0x6c], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x70]
lea edx, [ebp - 0x50]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x3c], 0x405060
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x68]
mov dword [ebp - 0x54], 1
push eax
push ecx
push edx
call fcn.0040ef10
add esp, 0xc
cmp byte [ebp - 0x50], 4
je 0x410697
lea eax, [ebp - 0x50]
push eax
call fcn.0040f060
add esp, 4
mov ecx, 7
int 0x29
ud2
mov ecx, eax
mov edx, 4
push 0x43b11c
jmp 0x4106b7
mov ecx, eax
mov edx, edi
push 0x43b14c
call fcn.004352f0
add esp, 4
ud2
lea ecx, [ebp - 0x74]
lea edx, [ebp - 0x40]
mov dword [ebp - 0x30], 0
push 0x43b12c
lea eax, [ebp - 0x38]
push eax
call fcn.00435b20
add esp, 8
ud2