Function at 0x100dd442
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x1010e2b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, ecx
mov dword [ebp - 0x30], edx
sar eax, 6
and ecx, 0x3f
push ebx
mov dword [ebp - 0x38], eax
imul ebx, ecx, 0x30
mov eax, dword [eax*4 + 0x1010f130]
push esi
push edi
mov eax, dword [ebx + eax + 0x18]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0xc]
add eax, edx
mov dword [ebp - 0x2c], eax
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_GetConsoleCP]
mov esi, dword [ebp + 8]
mov edi, esi
mov dword [ebp - 0x3c], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp - 0x30]
mov edi, eax
cmp eax, dword [ebp - 0x2c]
jae 0x100dd5f9
inc eax
mov dword [ebp - 0x24], eax
mov ch, byte [edi]
xor eax, eax
mov word [ebp - 0x18], ax
mov eax, dword [ebp - 0x38]
mov byte [ebp - 0x1f], ch
mov edx, dword [eax*4 + 0x1010f130]
mov cl, byte [ebx + edx + 0x2d]
test cl, 4
je 0x100dd4dd
mov al, byte [edx + ebx + 0x2e]
and cl, 0xfb
mov byte [ebp - 0xc], al
xor eax, eax
push eax
push 2
lea eax, [ebp - 0xc]
mov byte [ebp - 0xb], ch
mov byte [ebx + edx + 0x2d], cl
push eax
jmp 0x100dd52c
mov al, byte [edi]
mov byte [ebp - 0x19], al
call sym.ucrtbase.dll___pctype_func
mov dl, byte [ebp - 0x19]
xor esi, esi
movzx ecx, dl
cmp word [eax + ecx*2], si
mov esi, dword [ebp + 8]
jge 0x100dd526
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x24], eax
jae 0x100dd5d9
xor eax, eax
push eax
push 2
lea eax, [ebp - 0x18]
push edi
push eax
call sym.ucrtbase.dll__mbtowc_l
add esp, 0x10
cmp eax, 0xffffffff
je 0x100dd5f9
mov eax, dword [ebp - 0x24]
inc edi
inc eax
jmp 0x100dd544
xor eax, eax
push eax
push 1
push edi
lea eax, [ebp - 0x18]
push eax
call sym.ucrtbase.dll__mbtowc_l
add esp, 0x10
cmp eax, 0xffffffff
je 0x100dd5f9
mov eax, dword [ebp - 0x24]
inc edi
inc eax
mov dword [ebp - 0x24], eax
xor eax, eax
push eax
push ecx
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x14]
push 5
push eax
lea eax, [ebp - 0x18]
push 1
push eax
call fcn.1003f803
add esp, 0x18
mov dword [ebp - 0x40], eax
test eax, eax
je 0x100dd5f9
xor ecx, ecx
push ecx
lea ecx, [ebp - 0x28]
push ecx
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x100dd5f1
mov eax, dword [esi + 8]
sub eax, dword [ebp - 0x30]
add eax, edi
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x40]
cmp dword [ebp - 0x28], eax
jb 0x100dd5f9
cmp byte [ebp - 0x1f], 0xa
jne 0x100dd5ce
push 0xd
pop eax
mov word [ebp - 0x20], ax
xor eax, eax
push eax
lea eax, [ebp - 0x28]
push eax
push 1
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x100dd5f1
cmp dword [ebp - 0x28], 1
jb 0x100dd5f9
inc dword [esi + 8]
inc dword [esi + 4]
cmp edi, dword [ebp - 0x2c]
jb 0x100dd4a3
jmp 0x100dd5f9
mov eax, dword [ebp - 0x38]
mov eax, dword [eax*4 + 0x1010f130]
mov byte [ebx + eax + 0x2e], dl
or byte [ebx + eax + 0x2d], 4
inc dword [esi + 4]
jmp 0x100dd5f9
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov dword [esi], eax
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005cc20
mov esp, ebp
pop ebp
ret