Function at 0x40e6f0
Capabilities:
Get common file path
Get file size

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xb
push 0
push 0
dec ecx
jne 0x40e6f8
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x40ec3d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
dec eax
test eax, eax
jl 0x40e77b
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0
mov eax, dword [ebp - 8]
lea eax, [eax + eax*2]
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 4]
lea ecx, [edx + eax*8]
mov eax, dword [ecx + 0x10]
dec eax
test eax, eax
jl 0x40e773
inc eax
xor edx, edx
lea esi, [edx + edx*2]
mov ebx, dword [ecx + 0x14]
mov ebx, dword [ebx + esi*4]
mov edi, dword [ebp + 8]
cmp ebx, dword [edi - 8]
jne 0x40e76f
mov eax, dword [ecx + 0x14]
mov eax, dword [eax + esi*4 + 4]
mov edx, dword [ebp + 8]
mov dword [edx - 0xc], eax
jmp 0x40ec22
inc edx
dec eax
jne 0x40e74c
inc dword [ebp - 8]
dec dword [ebp - 0x28]
jne 0x40e732
call fcn.0040abe0
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40ec22
xor ecx, ecx
push ebp
push 0x40ec1b
push dword fs:[ecx]
mov dword fs:[ecx], esp
lea edx, [ebp - 0x30]
mov eax, 0x40ec54
call fcn.004070f0
lea eax, [ebp - 0x30]
push eax
lea edx, [ebp - 0x34]
mov eax, 0x40ec70
call fcn.004070f0
mov edx, dword [ebp - 0x34]
pop eax
call fcn.00403cfc
mov eax, dword [ebp - 0x30]
call fcn.00403eec
push eax
push 0
push 0
call fcn.00404cb4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40ec04
push 0xffffffffffffffff
mov eax, dword [ebp - 0x10]
push eax
call sub.KERNEL32.DLL_GetCurrentThreadId
xor ecx, ecx
push ebp
push 0x40ebf4
push dword fs:[ecx]
mov dword fs:[ecx], esp
push 0xc
lea edx, [ebp - 0x38]
mov eax, 0x40ec54
call fcn.004070f0
lea eax, [ebp - 0x38]
push eax
lea edx, [ebp - 0x3c]
mov eax, 0x40ec80
call fcn.004070f0
mov edx, dword [ebp - 0x3c]
pop eax
call fcn.00403cfc
mov eax, dword [ebp - 0x38]
call fcn.00403eec
push eax
call fcn.0040cc94
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40ebdd
call sub.KERNEL32.DLL_OpenMutexW
cmp eax, 0xb7
setne byte [ebp - 0x15]
push 0
push 0
push 0
push 0xf001f
mov eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.DLL_lstrcpyW
mov ebx, eax
test ebx, ebx
je 0x40ebd4
cmp byte [ebp - 0x15], 0
je 0x40e8b1
xor eax, eax
mov dword [ebx], eax
xor eax, eax
mov dword [ebx + 4], eax
push 0
push 0
mov eax, 0x40de30
xor ecx, ecx
xor edx, edx
call fcn.0040b2c0
mov esi, eax
mov dword [ebx + 8], esi
test esi, esi
je 0x40e8b1
push 2
push 0
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.DLL_LoadLibraryW
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryW
cmp dword [ebx + 8], 0
je 0x40ebce
mov byte [ebp - 0x16], 1
mov eax, dword [ebx]
dec eax
test eax, eax
jl 0x40e91c
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0
mov eax, dword [ebx + 4]
mov edx, dword [ebp - 8]
mov esi, dword [eax + edx*4]
mov eax, dword [esi + 0x208]
dec eax
test eax, eax
jl 0x40e914
inc eax
mov ecx, dword [esi + 0x208]
mov ecx, dword [esi + ecx*4 + 0x108]
mov edi, dword [ebp + 8]
cmp ecx, dword [edi - 8]
jne 0x40e911
mov eax, dword [esi + 0x208]
mov eax, dword [esi + eax*4 + 0xc]
mov ecx, dword [ebp + 8]
mov dword [ecx - 0xc], eax
mov byte [ebp - 0x16], 0
jmp 0x40e914
dec eax
jne 0x40e8e6
inc dword [ebp - 8]
dec dword [ebp - 0x28]
jne 0x40e8d1
cmp byte [ebp - 0x16], 0
je 0x40ebce
push 2
push 0
push 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff4
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
push eax
call sub.KERNEL32.DLL_LoadLibraryW
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryW
mov eax, dword [ebx]
dec eax
test eax, eax
jl 0x40ea1a
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0
mov eax, dword [ebx + 4]
mov edx, dword [ebp - 8]
mov eax, dword [eax + edx*4]
cmp dword [eax + 0x208], 0x3f
jge 0x40ea0e
inc dword [eax + 0x208]
mov edx, dword [eax + 0x208]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 8]
mov dword [eax + edx*4 + 0x108], ecx
mov edx, dword [eax + 0x208]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0xc]
mov dword [eax + edx*4 + 0xc], ecx
lea edx, [ebp - 0x44]
mov eax, 0x40ec54
call fcn.004070f0
push dword [ebp - 0x44]
lea edx, [ebp - 0x48]
mov eax, 0x40ec8c
call fcn.004070f0
push dword [ebp - 0x48]
lea eax, [ebp - 0x4c]
push eax
mov cl, 0x30
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00406d68
push dword [ebp - 0x4c]
lea eax, [ebp - 0x40]
mov edx, 3
call fcn.00403db4
mov eax, dword [ebp - 0x40]
call fcn.00403eec
push eax
push 0
push 0x1f0003
call sub.KERNEL32.DLL_lstrlenA
mov edi, eax
test edi, edi
je 0x40ea08
push edi
call sub.KERNEL32.DLL_RaiseException
push edi
call sub.KERNEL32.DLL_FormatMessageA
mov byte [ebp - 0x16], 0
jmp 0x40ea1a
inc dword [ebp - 8]
dec dword [ebp - 0x28]
jne 0x40e95f
cmp byte [ebp - 0x16], 0
je 0x40ebce
mov esi, ebx
lea edx, [ebp - 0x54]
mov eax, 0x40ec54
call fcn.004070f0
push dword [ebp - 0x54]
lea edx, [ebp - 0x58]
mov eax, 0x40ec8c
call fcn.004070f0
push dword [ebp - 0x58]
lea eax, [ebp - 0x5c]
push eax
mov eax, dword [esi]
mov cl, 0x30
mov edx, 1
call fcn.00406d68
push dword [ebp - 0x5c]
lea eax, [ebp - 0x50]
mov edx, 3
call fcn.00403db4
mov eax, dword [ebp - 0x50]
call fcn.00403eec
push eax
push 0
push 0
push 0
call sub.KERNEL32.DLL_GetCurrentDirectoryW
mov edi, eax
test edi, edi
je 0x40ebce
inc dword [esi]
push 0
mov eax, dword [esi]
shl eax, 2
push eax
call fcn.0040aed8
mov dword [ebp - 0x1c], eax
mov eax, dword [esi]
sub eax, 2
test eax, eax
jl 0x40eac6
inc eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0
mov eax, dword [esi + 4]
mov edx, dword [ebp - 8]
mov eax, dword [eax + edx*4]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 8]
mov dword [edx + ecx*4], eax
inc dword [ebp - 8]
dec dword [ebp - 0x28]
jne 0x40eaac
push 0
mov eax, dword [esi + 4]
push eax
call fcn.0040aff8
mov eax, dword [ebp - 0x1c]
mov dword [esi + 4], eax
push 0
push 0x20c
call fcn.0040aed8
mov edx, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ecx + edx*4 - 4], eax
mov eax, dword [esi]
mov edx, dword [esi + 4]
mov eax, dword [edx + eax*4 - 4]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [eax + 0x208], 1
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x10c], eax
push 2
push 0
push 0
mov eax, dword [ebp - 0x2c]
add eax, 0xc
push eax
mov eax, dword [ebp - 0xc]
push eax
push edi
call sub.KERNEL32.DLL_LoadLibraryW
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryW
push edi
call sub.KERNEL32.DLL_FormatMessageA
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0xc]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x10], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 8], eax
cmp dword [esi], 1
jne 0x40eb93
push 2
push 0
push 0
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.KERNEL32.DLL_LoadLibraryW
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryW
push 2
push 0
push 0
mov eax, dword [ebp - 0x2c]
add eax, 4
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.KERNEL32.DLL_LoadLibraryW
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryW
jmp 0x40ebad
mov eax, dword [esi + 4]
mov eax, dword [eax]
mov eax, dword [eax]
mov edx, dword [ebp - 0x2c]
mov dword [edx], eax
mov eax, dword [esi + 4]
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 4], eax
lea eax, [ebp - 0x20]
push eax
push 0
mov eax, dword [esi]
mov edx, dword [esi + 4]
mov eax, dword [edx + eax*4 - 4]
push eax
mov eax, dword [esi + 8]
push eax
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
call fcn.0040bb8c
push ebx
call sub.KERNEL32.DLL_ExitProcess
mov eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.DLL_FormatMessageA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40ebfb
mov eax, dword [ebp - 0x10]
push eax
call sub.KERNEL32.DLL_GetFileSize
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40ec22
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_FormatMessageA
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40ec44
lea eax, [ebp - 0x5c]
mov edx, 0xc
call fcn.00403b94
ret