Function at 0x407d80
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x431626
mov eax, dword fs:[0]
push eax
sub esp, 0xc48
mov eax, dword [0x443054]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea eax, [ebp - 0xc34]
push eax
call fcn.00419b80
add esp, 4
lea eax, [ebp - 0xc34]
push eax
call fcn.0041a536
movzx ecx, word [ebp - 0xc2c]
add esp, 4
mov edx, eax
push ecx
push dword [edx]
mov eax, dword [edx + 0x10]
push dword [edx + 4]
inc eax
push dword [edx + 8]
push dword [edx + 0xc]
push eax
mov eax, dword [edx + 0x14]
add eax, 0x76c
push eax
push str._04d__02d__02d__02d:_02d:_02d._03d
push 0x445278
call fcn.0040ae70
add esp, 0x24
mov byte [0x44528f], 0
push 0x445278
push str._s_GetModel
push 0x4451ec
call fcn.0040b450
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0x208
push 0
push eax
call fcn.00412210
add esp, 0xc
lea eax, [ebp - 0x424]
push 0x208
push 0
push eax
call fcn.00412210
add esp, 0xc
lea eax, [ebp - 0xc24]
push 0x800
push 0
push eax
call fcn.00412210
add esp, 0xc
lea eax, [ebp - 0xc24]
push str.B9ECED6F.ArmouryCrate_qmba6cd70vzyy
push 0x104
push eax
call fcn.00401130
add esp, 0xc
lea eax, [ebp - 0x424]
push eax
call fcn.004099e0
lea eax, [ebp - 0x424]
push eax
push str._lsAC_Debug
lea eax, [ebp - 0x21c]
push 0x104
push eax
call fcn.00401130
add esp, 0x10
call fcn.00401e60
mov ecx, eax
test ecx, ecx
je 0x4082c7
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0xc54], edi
mov dword [ebp - 4], 0
mov eax, dword [esi + 0x44]
call eax
mov esi, eax
call fcn.00401e60
mov ecx, eax
test ecx, ecx
je 0x4082d1
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xc48], eax
mov byte [ebp - 4], 1
test esi, esi
je 0x407f11
test esi, 0xffff0000
jne 0x407f11
movzx eax, si
lea ecx, [ebp - 0xc48]
push eax
call fcn.0040a660
jmp 0x407f1d
push esi
lea ecx, [ebp - 0xc48]
call fcn.0040a210
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0xc48]
push str.ROG_STRIX_Z370H_GAMING
push esi
call fcn.00419833
add esp, 8
test eax, eax
jne 0x407f4f
push str.ROG_STRIX_Z370_H_GAMING
lea ecx, [ebp - 0xc48]
call fcn.0040a210
mov esi, dword [ebp - 0xc48]
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4081e2
test al, 0x10
jne 0x4081e2
lea eax, [ebp - 0xc50]
mov dword [ebp - 0xc4c], 0
push eax
lea edx, [ebp - 0xc4c]
mov dword [ebp - 0xc50], 0
lea ecx, [ebp - 0x21c]
call fcn.0040f3c0
mov ebx, dword [ebp - 0xc4c]
add esp, 4
cmp dword [ebp - 0xc50], 0
jbe 0x40812b
lea eax, [ebp - 0xc34]
push eax
call fcn.00419b80
add esp, 4
lea eax, [ebp - 0xc34]
push eax
call fcn.0041a536
movzx ecx, word [ebp - 0xc2c]
add esp, 4
mov edx, eax
push ecx
push dword [edx]
mov eax, dword [edx + 0x10]
push dword [edx + 4]
inc eax
push dword [edx + 8]
push dword [edx + 0xc]
push eax
mov eax, dword [edx + 0x14]
add eax, 0x76c
push eax
push str._04d__02d__02d__02d:_02d:_02d._03d
push 0x445278
call fcn.0040ae70
add esp, 0x24
mov byte [0x44528f], 0
push 0x445278
push str._s_NonMB_debugFile___0
push 0x4451ec
call fcn.0040b450
add esp, 0xc
test ebx, ebx
je 0x408087
push 0
push 0
push 0xffffffffffffffff
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ebx, [eax - 1]
test ebx, ebx
jle 0x408087
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x40805f
push ebx
lea ecx, [ebp - 0xc48]
call fcn.0040a8a0
mov esi, dword [ebp - 0xc48]
push ebx
push esi
push 0xffffffffffffffff
push dword [ebp - 0xc4c]
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp ebx, dword [esi - 8]
jg 0x4082db
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi + ebx*2], ax
jmp 0x408098
lea ecx, [ebp - 0xc48]
call fcn.0040a470
mov esi, dword [ebp - 0xc48]
push esi
push 0x43df68
push 0x104
push 0x444fd8
call fcn.00401130
lea eax, [ebp - 0xc34]
push eax
call fcn.00419b80
add esp, 0x14
lea eax, [ebp - 0xc34]
push eax
call fcn.0041a536
movzx ecx, word [ebp - 0xc2c]
add esp, 4
mov edx, eax
push ecx
push dword [edx]
mov eax, dword [edx + 0x10]
push dword [edx + 4]
inc eax
push dword [edx + 8]
push dword [edx + 0xc]
push eax
mov eax, dword [edx + 0x14]
add eax, 0x76c
push eax
push str._04d__02d__02d__02d:_02d:_02d._03d
push 0x445278
call fcn.0040ae70
add esp, 0x24
mov byte [0x44528f], 0
push 0x444fd8
push 0x445278
push str._s_model___ls
push 0x4451ec
call fcn.0040b450
mov ebx, dword [ebp - 0xc4c]
jmp 0x4081c9
push str.ROG_MAXIMUS_XI_EXTREME
lea ecx, [ebp - 0xc48]
call fcn.0040a210
mov esi, dword [ebp - 0xc48]
push esi
push 0x43e414
push 0x104
push 0x444fd8
call fcn.00401130
lea eax, [ebp - 0xc34]
push eax
call fcn.00419b80
add esp, 0x14
lea eax, [ebp - 0xc34]
push eax
call fcn.0041a536
movzx ecx, word [ebp - 0xc2c]
add esp, 4
mov edx, eax
push ecx
push dword [edx]
mov eax, dword [edx + 0x10]
push dword [edx + 4]
inc eax
push dword [edx + 8]
push dword [edx + 0xc]
push eax
mov eax, dword [edx + 0x14]
add eax, 0x76c
push eax
push str._04d__02d__02d__02d:_02d:_02d._03d
push 0x445278
call fcn.0040ae70
add esp, 0x24
mov byte [0x44528f], 0
push 0x444fd8
push 0x445278
push str._s_model___ls
push 0x4451ec
call fcn.0040b450
add esp, 0x10
test ebx, ebx
je 0x40826d
push ebx
call fcn.004102d6
add esp, 4
jmp 0x40826d
push esi
push 0x43e414
push 0x104
push 0x444fd8
call fcn.00401130
lea eax, [ebp - 0xc44]
push eax
call fcn.00419b80
add esp, 0x14
lea eax, [ebp - 0xc44]
push eax
call fcn.0041a536
movzx ecx, word [ebp - 0xc3c]
add esp, 4
mov edx, eax
push ecx
push dword [edx]
mov eax, dword [edx + 0x10]
push dword [edx + 4]
inc eax
push dword [edx + 8]
push dword [edx + 0xc]
push eax
mov eax, dword [edx + 0x14]
add eax, 0x76c
push eax
push str._04d__02d__02d__02d:_02d:_02d._03d
push 0x445278
call fcn.0040ae70
add esp, 0x24
mov byte [0x44528f], 0
push 0x444fd8
push 0x445278
push str._s_model___ls
push 0x4451ec
call fcn.0040b450
add esp, 0x10
lea edx, [esi - 0x10]
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40828b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], esi
dec esi
test esi, esi
jg 0x4082a7
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004102c8
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.00407980
push 0x80004005
call fcn.00407980
push 0x80070057
call fcn.00407980
int3