Function at 0x401c40
Capabilities:
Create directory
Write file on windows

Disassembly:
sub esp, 0x220
push ebx
push esi
push edi
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
mov eax, dword [esp + 0x230]
push str.WinMain____2023.12.28___
mov dword [0x4237d4], eax
call fcn.00401040
add esp, 4
call fcn.004012e0
push 0
push str.c:log
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
call fcn.00401480
mov edx, dword [esp + 0x238]
test edx, edx
je 0x401d2c
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
test ebx, ebx
jle 0x401d0c
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x4239f8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov bl, byte [ebx + 0x4239f7]
cmp bl, 0x5c
je 0x401cfb
cmp bl, 0x2f
je 0x401cfb
mov edi, 0x42150c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x4239f8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x4239f8
lea eax, [esp + 0x3c]
push str.WinMain____
push eax
jmp 0x401d17
push edx
lea ecx, [esp + 0x3c]
push 0x4214d8
push ecx
call fcn.00409bd8
add esp, 0xc
lea edx, [esp + 0x38]
push edx
call fcn.00401040
add esp, 4
push str.CmdLineEnd
call fcn.00401040
mov eax, dword [0x4237d4]
add esp, 4
push 0
push 0x401e80
push 0
push 0x65
push eax
call dword [sym.imp.USER32.dll_CreateDialogParamA]
test eax, eax
mov dword [0x4237d8], eax
jne 0x401d7a
push 0x30
push 0x4214c4
push 0x4214b0
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x220
ret 0x10
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
push 0
push 0
lea ecx, [esp + 0x24]
push 0
push ecx
call esi
test eax, eax
je 0x401dd5
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageA]
push ebp
mov ebp, dword [sym.imp.USER32.dll_IsDialogMessageA]
mov eax, dword [0x4237d8]
lea edx, [esp + 0x20]
push edx
push eax
call ebp
test eax, eax
jne 0x401dc3
lea ecx, [esp + 0x20]
push ecx
call edi
lea edx, [esp + 0x20]
push edx
call ebx
push 0
push 0
lea eax, [esp + 0x28]
push 0
push eax
call esi
test eax, eax
jne 0x401da4
pop ebp
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push str.c:loginstallok.log
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
test ebx, ebx
je 0x401e59
xor ecx, ecx
mov edi, 0x42148c
mov dword [esp + 0xd], ecx
xor eax, eax
mov dword [esp + 0x11], ecx
lea edx, [esp + 0xc]
mov byte [esp + 0x15], cl
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0xc], 0
mov eax, ecx
mov esi, edi
mov edi, edx
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
lea edx, [esp + 0x10]
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
lea edi, [esp + 0x10]
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.WinMain___
call fcn.00401040
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x220
ret 0x10