Function at 0x403840
Capabilities:
Create directory
Get common file path
Get file version info
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x406290
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x630
push esi
push edi
mov dword [ebp - 0x634], ecx
mov dword [ebp - 0x210], 0
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x628], eax
mov ecx, dword [ebp - 0x628]
push ecx
lea ecx, [ebp - 0x228]
call sub.MFC42.DLL_CString::CString_1
mov dword [ebp - 4], 0
push 0x200
lea edx, [ebp - 0x20c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x228]
push eax
mov ecx, dword [ebp - 0x634]
add ecx, 0x8c
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x20c]
push ecx
lea ecx, [ebp - 0x228]
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x224]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 1
push 0x100
lea ecx, [ebp - 0x224]
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0xffffffffffffffff
lea ecx, [ebp - 0x224]
call sub.MFC42.DLL_CString::ReleaseBuffer
push 7
lea edx, [ebp - 0x60c]
push edx
lea ecx, [ebp - 0x224]
call sub.MFC42.DLL_CString::Right
mov dword [ebp - 0x630], eax
mov eax, dword [ebp - 0x630]
mov ecx, dword [eax]
mov dword [ebp - 0x62c], ecx
push str.Desktop
mov edx, dword [ebp - 0x62c]
push edx
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0x608], al
lea ecx, [ebp - 0x60c]
call fcn.00405b58
mov eax, dword [ebp - 0x608]
and eax, 0xff
test eax, eax
je 0x4039d3
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 1
mov dword [ebp - 0x234], 0xc
lea ecx, [ebp - 0x234]
push ecx
push str...TEMP
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push str...TEMP
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x100
lea ecx, [ebp - 0x224]
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0xffffffffffffffff
lea ecx, [ebp - 0x224]
call sub.MFC42.DLL_CString::ReleaseBuffer
push ecx
mov ecx, esp
mov dword [ebp - 0x610], esp
lea edx, [ebp - 0x224]
push edx
call sub.MFC42.DLL_CString::CString_2
mov dword [ebp - 0x638], eax
mov ecx, dword [ebp - 0x634]
call fcn.00405810
mov dword [ebp - 0x63c], eax
cmp dword [ebp - 0x63c], 0
jne 0x403a9a
lea eax, [ebp - 0x338]
push eax
push 0
push 0
push 0x801a
push 0
call fcn.004037d0
add esp, 0x14
test eax, eax
jl 0x403a86
lea ecx, [ebp - 0x338]
push ecx
push str._sWinclient
lea edx, [ebp - 0x224]
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov dword [ebp - 0x340], 0
mov dword [ebp - 0x33c], 1
mov dword [ebp - 0x344], 0xc
lea eax, [ebp - 0x344]
push eax
mov ecx, dword [ebp - 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edx, dword [ebp - 0x224]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
jmp 0x403a9a
push 0
push 0
push str.Can_not_find_temporary_path
mov ecx, dword [ebp - 0x634]
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::CFile
mov byte [ebp - 4], 2
push 0
push 0x40
mov eax, dword [ebp - 0x228]
push eax
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x40425e
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::GetLength
mov dword [ebp - 0x348], eax
cmp dword [ebp - 0x348], 8
jle 0x403af0
push 2
push 0xfffffffffffffff8
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Seek
mov byte [ebp - 0x358], 0
xor ecx, ecx
mov dword [ebp - 0x357], ecx
mov dword [ebp - 0x353], ecx
mov byte [ebp - 0x34f], cl
mov dword [ebp - 0x34c], 0
push 4
lea edx, [ebp - 0x358]
push edx
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Read
mov eax, dword [ebp - 0x358]
and eax, 0xff
cmp eax, 0x51
jne 0x404249
mov ecx, dword [ebp - 0x357]
and ecx, 0xff
cmp ecx, 0xaf
jne 0x404249
mov edx, dword [ebp - 0x356]
and edx, 0xff
cmp edx, 0x51
jne 0x404249
mov eax, dword [ebp - 0x355]
and eax, 0xff
cmp eax, 0xaf
jne 0x404249
push 4
lea ecx, [ebp - 0x34c]
push ecx
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Read
mov dword [ebp - 0x35c], 0
mov edx, dword [ebp - 0x34c]
sar edx, 0x18
and edx, 0xff
mov eax, dword [ebp - 0x34c]
sar eax, 8
and eax, 0xff00
or edx, eax
mov ecx, dword [ebp - 0x34c]
shl ecx, 8
and ecx, 0xff0000
or edx, ecx
mov eax, dword [ebp - 0x34c]
shl eax, 0x18
or edx, eax
mov dword [ebp - 0x34c], edx
push 0
mov ecx, dword [ebp - 0x34c]
push ecx
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Seek
mov dword [ebp - 0x360], 0
push 4
lea edx, [ebp - 0x360]
push edx
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Read
mov eax, dword [ebp - 0x360]
sar eax, 0x18
and eax, 0xff
mov ecx, dword [ebp - 0x360]
sar ecx, 8
and ecx, 0xff00
or eax, ecx
mov edx, dword [ebp - 0x360]
shl edx, 8
and edx, 0xff0000
or eax, edx
mov ecx, dword [ebp - 0x360]
shl ecx, 0x18
or eax, ecx
mov dword [ebp - 0x360], eax
cmp dword [ebp - 0x360], 0
jle 0x40423d
mov dword [ebp - 0x570], 0
mov dword [ebp - 0x56c], 0
mov byte [ebp - 0x564], 0
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x563]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 4
lea edx, [ebp - 0x570]
push edx
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Read
mov eax, dword [ebp - 0x570]
sar eax, 0x18
and eax, 0xff
mov ecx, dword [ebp - 0x570]
sar ecx, 8
and ecx, 0xff00
or eax, ecx
mov edx, dword [ebp - 0x570]
shl edx, 8
and edx, 0xff0000
or eax, edx
mov ecx, dword [ebp - 0x570]
shl ecx, 0x18
or eax, ecx
mov dword [ebp - 0x570], eax
push 4
lea edx, [ebp - 0x56c]
push edx
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Read
mov eax, dword [ebp - 0x56c]
sar eax, 0x18
and eax, 0xff
mov ecx, dword [ebp - 0x56c]
sar ecx, 8
and ecx, 0xff00
or eax, ecx
mov edx, dword [ebp - 0x56c]
shl edx, 8
and edx, 0xff0000
or eax, edx
mov ecx, dword [ebp - 0x56c]
shl ecx, 0x18
or eax, ecx
mov dword [ebp - 0x56c], eax
push 0x1a
lea edx, [ebp - 0x564]
push edx
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Read
lea eax, [ebp - 0x564]
push eax
mov ecx, dword [ebp - 0x634]
add ecx, 0x84
call sub.MFC42.DLL_CString::operator
push 4
mov ecx, dword [ebp - 0x634]
add ecx, 0xfc
push ecx
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Read
mov edx, dword [ebp - 0x634]
mov eax, dword [edx + 0xfc]
sar eax, 0x18
and eax, 0xff
mov ecx, dword [ebp - 0x634]
mov edx, dword [ecx + 0xfc]
sar edx, 8
and edx, 0xff00
or eax, edx
mov ecx, dword [ebp - 0x634]
mov edx, dword [ecx + 0xfc]
shl edx, 8
and edx, 0xff0000
or eax, edx
mov ecx, dword [ebp - 0x634]
mov edx, dword [ecx + 0xfc]
shl edx, 0x18
or eax, edx
mov ecx, dword [ebp - 0x634]
mov dword [ecx + 0xfc], eax
push 0
mov edx, dword [ebp - 0x570]
push edx
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Seek
mov eax, dword [ebp - 0x56c]
add eax, 0xa
push eax
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [ebp - 0x614], eax
mov ecx, dword [ebp - 0x614]
mov dword [ebp - 0x364], ecx
mov edx, dword [ebp - 0x56c]
push edx
mov eax, dword [ebp - 0x364]
push eax
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Read
mov ecx, dword [ebp - 0x56c]
push ecx
mov edx, dword [ebp - 0x364]
push edx
lea eax, [ebp - 0x564]
push eax
call fcn.004036e0
add esp, 0xc
mov byte [ebp - 0x568], al
cmp dword [ebp + 8], 0
jne 0x403e69
mov ecx, dword [ebp - 0x568]
and ecx, 0xff
test ecx, ecx
je 0x404215
mov dword [ebp - 0x574], 0
cmp dword [ebp + 8], 0
je 0x40417b
push str.Winclient.ocx
lea edx, [ebp - 0x564]
push edx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x403eab
mov eax, dword [ebp - 0x634]
mov dword [eax + 0x94], 0x102c
jmp 0x40400d
push str.Winclient0.ocx
lea ecx, [ebp - 0x564]
push ecx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x403ed9
mov edx, dword [ebp - 0x634]
mov dword [edx + 0x94], 0x844
jmp 0x40400d
push str.Winclient1.ocx
lea eax, [ebp - 0x564]
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x403f07
mov ecx, dword [ebp - 0x634]
mov dword [ecx + 0x94], 0x1770
jmp 0x40400d
push str.Winclient2.ocx
lea edx, [ebp - 0x564]
push edx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x403f35
mov eax, dword [ebp - 0x634]
mov dword [eax + 0x94], 0xc2c
jmp 0x40400d
push str.Winclient3.ocx
lea ecx, [ebp - 0x564]
push ecx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x403f63
mov edx, dword [ebp - 0x634]
mov dword [edx + 0x94], 0x2198
jmp 0x40400d
push str.Winclient5.ocx
lea eax, [ebp - 0x564]
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x403f8e
mov ecx, dword [ebp - 0x634]
mov dword [ecx + 0x94], 0x102d
jmp 0x40400d
push str.Winclient28.ocx
lea edx, [ebp - 0x564]
push edx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x403fb9
mov eax, dword [ebp - 0x634]
mov dword [eax + 0x94], 0x1fe4
jmp 0x40400d
push str.Winclient30.ocx
lea ecx, [ebp - 0x564]
push ecx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x403fe4
mov edx, dword [ebp - 0x634]
mov dword [edx + 0x94], 0x1fe5
jmp 0x40400d
push str.Winclient31.ocx
lea eax, [ebp - 0x564]
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x40400d
mov ecx, dword [ebp - 0x634]
mov dword [ecx + 0x94], 0x2199
mov byte [ebp - 0x5d8], 0
mov ecx, 0x18
xor eax, eax
lea edi, [ebp - 0x5d7]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x5e0], 0
mov dword [ebp - 0x5dc], 0
mov edx, dword [ebp - 0x5e0]
push edx
lea eax, [ebp - 0x564]
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov dword [ebp - 0x5e4], eax
cmp dword [ebp - 0x5e4], 0
jbe 0x40413e
mov ecx, dword [ebp - 0x5e4]
add ecx, 0x64
push ecx
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [ebp - 0x618], eax
mov edx, dword [ebp - 0x618]
mov dword [ebp - 0x5dc], edx
mov eax, dword [ebp - 0x5dc]
push eax
mov ecx, dword [ebp - 0x5e4]
add ecx, 0x64
push ecx
push 0
lea edx, [ebp - 0x564]
push edx
call sub.VERSION.dll_GetFileVersionInfoA
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 0x5f0], al
mov dword [ebp - 0x5f4], 0
mov dword [ebp - 0x5e8], 0
lea eax, [ebp - 0x5e8]
push eax
lea ecx, [ebp - 0x5f4]
push ecx
push str.StringFileInfo040904e4FileVersion
mov edx, dword [ebp - 0x5dc]
push edx
call sub.VERSION.dll_VerQueryValueA
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 0x5f0], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x5ec], eax
mov edi, dword [ebp - 0x5f4]
lea edx, [ebp - 0x5d8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x5dc]
mov dword [ebp - 0x61c], ecx
mov edx, dword [ebp - 0x61c]
push edx
call sub.MFC42.DLL_operatordelete
add esp, 4
lea eax, [ebp - 0x5d8]
push eax
mov ecx, dword [ebp - 0x56c]
push ecx
mov edx, dword [ebp - 0x364]
push edx
mov ecx, dword [ebp - 0x634]
call fcn.00405610
test eax, eax
jne 0x40417b
mov eax, dword [ebp - 0x568]
and eax, 0xff
test eax, eax
jne 0x40417b
mov dword [ebp - 0x574], 1
cmp dword [ebp - 0x574], 0
jne 0x404215
lea ecx, [ebp - 0x604]
call sub.MFC42.DLL_CFile::CFile
mov byte [ebp - 4], 3
push 0
push 0x1001
lea ecx, [ebp - 0x564]
push ecx
lea ecx, [ebp - 0x604]
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x4041fc
lea edx, [ebp - 0x564]
push edx
mov ecx, dword [ebp - 0x634]
add ecx, 0x84
call sub.MFC42.DLL_CString::operator
mov eax, dword [ebp - 0x56c]
push eax
mov ecx, dword [ebp - 0x364]
push ecx
lea ecx, [ebp - 0x604]
call sub.MFC42.DLL_CFile::Write
lea ecx, [ebp - 0x604]
call sub.MFC42.DLL_CFile::Close
mov dword [ebp - 0x210], 1
jmp 0x404206
mov dword [ebp - 0x210], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x604]
call fcn.00405c9c
mov edx, dword [ebp - 0x364]
mov dword [ebp - 0x620], edx
mov eax, dword [ebp - 0x620]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Close
jmp 0x404247
mov dword [ebp - 0x210], 0
jmp 0x40425e
lea ecx, [ebp - 0x220]
call sub.MFC42.DLL_CFile::Close
mov dword [ebp - 0x210], 0
mov ecx, dword [ebp - 0x210]
mov dword [ebp - 0x624], ecx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x220]
call fcn.00405c9c
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x224]
call fcn.00405b58
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x228]
call fcn.00405b58
mov eax, dword [ebp - 0x624]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4