Function at 0x404ba0
Capabilities:
Get common file path
Get file attributes
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x414bdc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x148
mov eax, dword [0x41c260]
push ebx
push esi
mov esi, ecx
lea ecx, [esp + 8]
mov dword [esp + 0x14c], eax
mov dword [esp + 0x10], esi
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_3]
xor ebx, ebx
push 0x104
lea ecx, [esp + 0xc]
mov dword [esp + 0x15c], ebx
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::GetBuffer]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
lea ecx, [esp + 8]
jne 0x404c12
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
xor eax, eax
jmp 0x404e35
push edi
push 0xffffffffffffffff
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::ReleaseBuffer]
mov eax, dword [str.EDWATCH.Tmp]
push eax
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator]
push ebx
push 0x80
push 3
push ebx
push 1
push bind
lea ecx, [esp + 0x24]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x404c64
lea ecx, [esp + 0xc]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
xor eax, eax
jmp 0x404e34
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea ecx, [esp + 0x50]
push ecx
push 4
lea edx, [esp + 0x2c]
push edx
push edi
call ebp
test eax, eax
je 0x404e20
cmp dword [esp + 0x20], 2
jne 0x404e20
add esi, 0x1c
push esi
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push ebx
lea eax, [esp + 0x18]
push eax
push 0x28
lea ecx, [esp + 0x30]
push ecx
push edi
mov dword [esp + 0x28], ebx
call ebp
cmp dword [esp + 0x14], 0x28
jne 0x404e01
jmp 0x404cc0
push ebx
lea edx, [esp + 0x18]
push edx
push 0x104
lea eax, [esp + 0x5c]
push eax
push edi
call ebp
lea ecx, [esp + 0x50]
push ecx
mov byte [esp + 0x157], bl
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov esi, eax
lea eax, [esp + 0x50]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x404cf0
sub eax, edx
inc eax
push eax
call sub.MFC71.DLL_operator_new
add esp, 4
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x50]
mov edx, eax
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp al, bl
jne 0x404d10
push ebx
lea edx, [esp + 0x18]
push edx
push 0x104
lea eax, [esp + 0x5c]
push eax
push edi
call ebp
cmp esi, 0xffffffff
jne 0x404d54
mov ecx, dword [esp + 0x24]
push ecx
mov dword [esp + 0x34], 1
mov dword [esp + 0x38], 2
call sub.MFC71.DLL_operator_delete
add esp, 4
jmp 0x404dde
cmp byte [esp + 0x50], bl
mov byte [esp + 0x153], bl
je 0x404d99
lea eax, [esp + 0x50]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x404d68
sub eax, edx
inc eax
push eax
call sub.MFC71.DLL_operator_new
add esp, 4
mov dword [esp + 0x3c], eax
lea ecx, [esp + 0x50]
mov edx, eax
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp al, bl
jne 0x404d85
mov dword [esp + 0x34], 3
jmp 0x404da8
cmp dword [esp + 0x34], 3
mov dword [esp + 0x3c], ebx
jne 0x404da8
mov dword [esp + 0x34], ebx
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x24]
push edx
mov ecx, esi
call fcn.004030c0
test eax, eax
je 0x404dcb
lea eax, [esp + 0x24]
push eax
lea ecx, [esi + 8]
call fcn.00404640
jmp 0x404dd7
lea ecx, [esp + 0x24]
push ecx
mov ecx, esi
call fcn.004024b0
mov dword [esi + 0x5c], 1
push ebx
lea edx, [esp + 0x18]
push edx
push 0x28
lea eax, [esp + 0x30]
push eax
push edi
mov dword [esp + 0x28], ebx
call ebp
cmp dword [esp + 0x14], 0x28
je 0x404cc0
mov esi, dword [esp + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
mov eax, 1
jmp 0x404e33
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
xor eax, eax
pop ebp
pop edi
mov ecx, dword [esp + 0x150]
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x148]
pop ebx
call fcn.004140fd
add esp, 0x154
ret