Function at 0x40a930
Capabilities:
Check if file exists
Extract resource via kernel32 functions
Get file attributes
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4a8580
mov eax, dword fs:[0]
push eax
sub esp, 0x74
mov eax, dword [0x4ecba0]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4ecba0]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
lea ecx, [esp + 0x40]
call fcn.00477fa7
mov dword [esp + 0x90], 0
call fcn.0046d74a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40a993
push 0x80004005
call fcn.00402240
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x1c], ebp
mov byte [esp + 0x90], 1
call fcn.0046d74a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40a9c5
push 0x80004005
call fcn.00402240
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
push 0xff
mov byte [esp + 0x94], 2
call fcn.00490201
add esp, 4
test eax, eax
jne 0x40aa51
lea eax, [ebx - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x90], 1
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aa12
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov byte [esp + 0x90], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aa36
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x40]
mov dword [esp + 0x90], 0xffffffff
call fcn.004783b1
xor al, al
jmp 0x40af23
call fcn.00477002
mov esi, dword [eax + 0xc]
push str.extfiles
push 0xd8
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x40aa7b
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40a9ee
mov ebp, dword [sym.imp.KERNEL32.dll_LoadResource]
push edi
push esi
call ebp
mov ebx, dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push esi
mov dword [esp + 0x1c], eax
call ebx
push 0x1001
push str.as_mp_Toolv0.6.ini
lea ecx, [esp + 0x28]
mov esi, eax
call fcn.00477f30
mov ecx, dword [esp + 0x14]
push esi
push ecx
lea ecx, [esp + 0x28]
mov byte [esp + 0x98], 3
call fcn.004775df
push str.as_mp_Toolv0.6.ini
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40aaed
push str.as_mp_Toolv0.6.ini
push 0x26af
push str.CMPToolDlg::bExtractResourceFiles
push str._s:_d:___s_GetFileAttributes_fail.
call fcn.0044b7f0
add esp, 0x10
jmp 0x40ab00
test al, 2
jne 0x40ab00
or eax, 2
push eax
push str.as_mp_Toolv0.6.ini
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x20]
call fcn.00477843
call fcn.00477002
mov esi, dword [eax + 0xc]
push str.extfiles
push 0xda
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x40ab8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x26bc
push str.CMPToolDlg::bExtractResourceFiles
push str._s:_d:_FindResource_fail:__d
call fcn.0044b7f0
add esp, 0x10
lea ecx, [esp + 0x20]
mov byte [esp + 0x90], 2
call fcn.004779c2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x90], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ab7f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
jmp 0x40aa15
push edi
push esi
call ebp
push edi
push esi
mov dword [esp + 0x1c], eax
call ebx
push 0x1001
push 0x4b89ec
lea ecx, [esp + 0x38]
mov esi, eax
call fcn.00477f30
mov ecx, dword [esp + 0x14]
push esi
push ecx
lea ecx, [esp + 0x38]
mov byte [esp + 0x98], 4
call fcn.004775df
push 0x4b89ec
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40abec
push 0x26c6
push str.CMPToolDlg::bExtractResourceFiles
push str._s:_d:_GetFileAttributes_fail.
call fcn.0044b7f0
add esp, 0xc
jmp 0x40abff
test al, 2
jne 0x40abff
or eax, 2
push eax
push 0x4b89ec
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x30]
call fcn.00477843
call fcn.00477002
mov esi, dword [eax + 0xc]
push str.extfiles
push 0xdb
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x40ac7e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x26d1
push str.CMPToolDlg::bExtractResourceFiles
push str._s:_d:_FindResource_fail:__d
call fcn.0044b7f0
add esp, 0x10
lea ecx, [esp + 0x30]
mov byte [esp + 0x90], 3
call fcn.004779c2
lea ecx, [esp + 0x20]
mov byte [esp + 0x90], 2
call fcn.004779c2
lea ecx, [esp + 0x18]
call fcn.004024d0
lea ecx, [esp + 0x1c]
call fcn.004024d0
jmp 0x40aa36
push edi
push esi
call ebp
push edi
push esi
mov dword [esp + 0x1c], eax
call ebx
push 0x1001
push str.AsmIo64.sys
lea ecx, [esp + 0x5c]
mov esi, eax
call fcn.00477f30
mov edx, dword [esp + 0x14]
push esi
push edx
lea ecx, [esp + 0x5c]
mov byte [esp + 0x98], 5
call fcn.004775df
push str.AsmIo64.sys
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40acdf
push 0x26db
push str.CMPToolDlg::bExtractResourceFiles
push str._s:_d:_GetFileAttributes_fail.
call fcn.0044b7f0
add esp, 0xc
jmp 0x40acf2
test al, 2
jne 0x40acf2
or eax, 2
push eax
push str.AsmIo64.sys
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x54]
call fcn.00477843
call fcn.00477002
mov esi, dword [eax + 0xc]
push str.extfiles
push 0xdd
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x40ad4e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x26e6
push str.CMPToolDlg::bExtractResourceFiles
push str._s:_d:_FindResource_fail:__d
call fcn.0044b7f0
add esp, 0x10
lea ecx, [esp + 0x54]
mov byte [esp + 0x90], 4
call fcn.004779c2
jmp 0x40ac45
push edi
push esi
call ebp
push edi
push esi
mov dword [esp + 0x1c], eax
call ebx
push 0x1001
push str.LimitationTable.ini
lea ecx, [esp + 0x6c]
mov esi, eax
call fcn.00477f30
mov eax, dword [esp + 0x14]
push esi
push eax
lea ecx, [esp + 0x6c]
mov byte [esp + 0x98], 6
call fcn.004775df
push str.LimitationTable.ini
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40adaf
push 0x26f0
push str.CMPToolDlg::bExtractResourceFiles
push str._s:_d:_GetFileAttributes_fail.
call fcn.0044b7f0
add esp, 0xc
jmp 0x40adc2
test al, 2
jne 0x40adc2
or eax, 2
push eax
push str.LimitationTable.ini
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x64]
call fcn.00477843
call fcn.00477002
mov esi, dword [eax + 0xc]
push str.extfiles
push 0xd9
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x40ae2f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x26fb
push str.CMPToolDlg::bExtractResourceFiles
push str._s:_d:_FindResource_fail:__d
call fcn.0044b7f0
add esp, 0x10
lea ecx, [esp + 0x64]
mov byte [esp + 0x90], 5
call fcn.004779c2
lea ecx, [esp + 0x54]
mov byte [esp + 0x90], 4
call fcn.004779c2
jmp 0x40ac45
push edi
push esi
call ebp
push edi
push esi
mov ebp, eax
call ebx
push 0x1001
push str.AS_USB4_YYMMDD_SS_CC_TT.bin
lea ecx, [esp + 0x7c]
mov esi, eax
call fcn.00477f30
push esi
push ebp
lea ecx, [esp + 0x7c]
mov byte [esp + 0x98], 7
call fcn.004775df
push str.AS_USB4_YYMMDD_SS_CC_TT.bin
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40ae8a
push 0x2705
push str.CMPToolDlg::bExtractResourceFiles
push str._s:_d:_GetFileAttributes_fail.
call fcn.0044b7f0
add esp, 0xc
jmp 0x40ae9d
test al, 2
jne 0x40ae9d
or eax, 2
push eax
push str.AS_USB4_YYMMDD_SS_CC_TT.bin
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x74]
call fcn.00477843
lea ecx, [esp + 0x74]
mov byte [esp + 0x90], 6
call fcn.004779c2
lea ecx, [esp + 0x64]
mov byte [esp + 0x90], 5
call fcn.004779c2
lea ecx, [esp + 0x54]
mov byte [esp + 0x90], 4
call fcn.004779c2
lea ecx, [esp + 0x30]
mov byte [esp + 0x90], 3
call fcn.004779c2
lea ecx, [esp + 0x20]
mov byte [esp + 0x90], 2
call fcn.004779c2
lea ecx, [esp + 0x18]
call fcn.004024d0
lea ecx, [esp + 0x1c]
call fcn.004024d0
lea ecx, [esp + 0x40]
mov dword [esp + 0x90], 0xffffffff
call fcn.004783b1
mov al, 1
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.0048f35c
add esp, 0x80
ret