Function at 0x40b860
Capabilities:
Get common file path
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1048
call fcn.004098b0
mov eax, dword [0x439004]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [0x43b404]
mov ecx, dword [0x1f82bb4]
push ebx
push esi
push edi
xor ebx, ebx
xor eax, eax
mov edi, 0xec58acac
or esi, 0xffffffff
cmp eax, 0x180
jne 0x40b89f
lea ecx, [edx + 0xa231]
cmp ecx, 0x141
jne 0x40b8b3
mov dword [0x43bf08], edi
mov dword [0x43bf0c], esi
inc eax
cmp eax, 0x12376ec
jl 0x40b892
mov edi, dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
mov dword [0x1f82bb4], ecx
xor esi, esi
lea esp, [esp]
cmp esi, 0x562d05
jne 0x40b8e2
mov eax, dword [0x439ff8]
mov dword [0x1f82ce4], eax
cmp ecx, 0x3c
jne 0x40b8f2
push ebx
push ebx
push ebx
call edi
mov ecx, dword [0x1f82bb4]
inc esi
cmp esi, 0x5f6c74
jl 0x40b8d0
cmp ecx, 0x7c
jne 0x40b9c5
lea ecx, [ebp - 0x1018]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push ebx
call dword [sym.imp.USER32.dll_SetActiveWindow]
lea edx, [ebp - 0x1038]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push ebx
call dword [sym.imp.KERNEL32.dll_DebugActiveProcessStop]
push ebx
call dword [sym.imp.KERNEL32.dll_FindAtomW]
push ebx
lea eax, [ebp - 0x1014]
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
xor edx, edx
xor ecx, ecx
mov word [ebp - 0x100a], dx
xor eax, eax
mov word [ebp - 0x1006], cx
lea edx, [ebp - 0x1020]
push edx
mov word [ebp - 0x1008], ax
mov eax, dword [ebp - 0x1008]
push eax
mov word [ebp - 0x100c], cx
mov ecx, dword [ebp - 0x100c]
push ecx
lea edx, [ebp - 0x1010]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputA]
lea eax, [ebp - 0xc04]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
cmp dword [0x1f82bb4], 0x2d
jne 0x40b9a7
push ebx
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x437dac
push 0x43be80
call fcn.00401015
push ebx
call fcn.004011a9
mov ecx, dword [0x1f82bb4]
add esp, 0xc
cmp ecx, 0x110a
jne 0x40ba57
mov dword [0x1f82ba8], ebx
mov dword [0x1f82bac], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetLocaleInfoA]
mov ecx, dword [ebp - 0x1010]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
push ebx
push ebx
lea edx, [ebp - 0x1004]
push edx
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasesW]
push ebx
push ebx
push ebx
lea eax, [ebp - 0x804]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CompareStringW]
push ebx
call dword [sym.imp.KERNEL32.dll_ZombifyActCtx]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_PurgeComm]
push ebx
push ebx
call fcn.004010c6
push ebx
push ebx
call fcn.004010c6
call fcn.00408053
push str.0__s__d__f
call fcn.0040118c
push ebx
push ebx
call fcn.004011bf
push ebx
call fcn.00401092
add esp, 0x20
call fcn.0040b4d0
xor esi, esi
cmp dword [0x1f82bb4], ebx
jbe 0x40babd
mov edi, dword [sym.imp.KERNEL32.dll_CommConfigDialogA]
mov ebx, 0x19b0
mov ecx, dword [0x1f82ce4]
mov dword [ebp - 0x1008], ecx
mov eax, 0xa231
add dword [ebp - 0x1008], eax
mov edx, dword [ebp - 0x1008]
mov al, byte [edx + esi]
mov ecx, dword [0x1f829fc]
mov byte [ecx + esi], al
cmp dword [0x1f82bb4], 0x5ab
jne 0x40bab4
push 0
push 0
push 0
call edi
mov dword [0x1f82a00], ebx
inc esi
cmp esi, dword [0x1f82bb4]
jb 0x40ba71
push str.msimg32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
call fcn.0040b540
call fcn.0040b510
call fcn.0040b7e0
call fcn.0040b500
mov ecx, dword [ebp - 0x1040]
xor eax, eax
cmp eax, 0x408e
jle 0x40baf3
cmp ecx, 0xf5bed7
jne 0x40bafb
inc eax
cmp eax, 0x687ed2
jl 0x40bae4
mov esi, dword [sym.imp.KERNEL32.dll_EnumTimeFormatsW]
mov edi, 0x1e4165
mov ebx, 0x8e46a6f0
jmp 0x40bb10
cmp dword [0x1f82bb4], 0xcc1
jne 0x40bb24
push 0
push 0
push 0
call esi
sub edi, 1
mov dword [0x1f82bb0], ebx
jne 0x40bb10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401006
mov esp, ebp
pop ebp
ret