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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x64
push esi
push edi
cmp dword [0x415424], 0
je 0x40a8dd
mov eax, 1
jmp 0x40abe6
call fcn.0040a850
push str.IniRegistryLib_is_getting_loaded._r_n
call fcn.0040a850
add esp, 4
cmp dword [ebp + 0xc], 0
je 0x40a92c
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
add ecx, 2
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x14]
mov ax, word [edx]
mov word [ebp - 2], ax
add dword [ebp - 0x14], 2
cmp word [ebp - 2], 0
jne 0x40a904
mov ecx, dword [ebp - 0x14]
sub ecx, dword [ebp - 0x44]
sar ecx, 1
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x38], edx
jmp 0x40a933
mov dword [ebp - 0x38], 3
mov eax, dword [ebp - 0x38]
add eax, 1
mov dword [ebp - 0x34], eax
mov ecx, 0x104
sub ecx, dword [ebp - 0x34]
push ecx
push 0x4376d8
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jbe 0x40abdf
mov eax, dword [ebp - 0x2c]
lea ecx, [eax*2 + 0x4376d6]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
push edx
push str._s__r_n
call fcn.0040a850
add esp, 8
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], 0
cmp dword [ebp - 0x20], 0
jne 0x40a9d1
cmp dword [ebp - 0xc], 0x4376d8
jbe 0x40a9d1
cmp dword [ebp - 0x28], 0
jne 0x40a9b5
mov eax, dword [ebp - 0xc]
movzx ecx, word [eax]
cmp ecx, 0x2e
jne 0x40a9b3
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x28], edx
jmp 0x40a9c6
mov eax, dword [ebp - 0xc]
movzx ecx, word [eax]
cmp ecx, 0x5c
jne 0x40a9c6
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0xc]
sub eax, 2
mov dword [ebp - 0xc], eax
jmp 0x40a98d
cmp dword [ebp - 0x20], 0
je 0x40abdf
mov dword [ebp - 0x40], 0
mov ecx, dword [ebp - 0x20]
add ecx, 2
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x28]
add edx, 2
mov dword [ebp - 0x50], edx
cmp dword [ebp + 0xc], 0
je 0x40aa12
mov eax, dword [ebp - 0x34]
shl eax, 1
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x30]
push edx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
jmp 0x40aa8a
mov eax, dword [ebp - 0x30]
sub eax, 0x4376d8
sar eax, 1
mov ecx, dword [ebp - 0x2c]
sub ecx, eax
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x24], 0
jmp 0x40aa36
mov edx, dword [ebp - 0x24]
add edx, 1
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x24], 1
jae 0x40aa73
mov eax, dword [ebp - 0x24]
lea ecx, [eax*8 + 0x415070]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x4c]
push edx
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ecx + 4]
push edx
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax]
push ecx
call fcn.0040a860
movzx edx, al
test edx, edx
je 0x40aa71
mov dword [ebp - 0x40], 1
jmp 0x40aa2d
mov eax, dword [ebp - 0x34]
shl eax, 1
push eax
push 0x4136dc
mov ecx, dword [ebp - 0x50]
push ecx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
cmp dword [ebp - 0x40], 0
jne 0x40abdf
push 0x4376d8
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40abdf
mov ecx, 0x82
mov esi, 0x4376d8
mov edi, 0x4374d0
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x18], 0x4374d0
mov edx, dword [ebp - 0x18]
add edx, 2
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x18]
mov cx, word [eax]
mov word [ebp - 4], cx
add dword [ebp - 0x18], 2
cmp word [ebp - 4], 0
jne 0x40aac9
mov edx, dword [ebp - 0x18]
sub edx, dword [ebp - 0x54]
sar edx, 1
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
lea ecx, [eax*2 + 0x4374ce]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
movzx eax, word [edx]
cmp eax, 0x5c
je 0x40ab15
cmp dword [ebp - 0x10], 0x4374d0
jbe 0x40ab15
mov ecx, dword [ebp - 0x10]
sub ecx, 2
mov dword [ebp - 0x10], ecx
jmp 0x40aaf6
xor edx, edx
mov eax, dword [ebp - 0x10]
mov word [eax], dx
mov ecx, dword [ebp - 0x10]
sub ecx, 0x4374d0
sar ecx, 1
add ecx, 1
mov dword [0x41541c], ecx
push 0x4374d0
push str.wszIniRegDirectory__s__r_n
call fcn.0040a850
add esp, 8
mov ecx, 0x82
mov esi, 0x4376d8
mov edi, 0x4378e0
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x1c], 0x4378e0
mov edx, dword [ebp - 0x1c]
add edx, 2
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x1c]
mov cx, word [eax]
mov word [ebp - 6], cx
add dword [ebp - 0x1c], 2
cmp word [ebp - 6], 0
jne 0x40ab64
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0x5c]
sar edx, 1
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x64]
lea edx, [ecx*2 + 0x4378e0]
mov eax, dword [str..ext]
mov dword [edx], eax
mov ecx, dword [0x4134f4]
mov dword [edx + 4], ecx
mov ax, word [0x4134f8]
mov word [edx + 8], ax
push 0x4378e0
push str.g_wszIniRegExtPath:__s__r_n
call fcn.0040a850
add esp, 8
mov ecx, dword [ebp + 0x10]
mov dword [0x415420], ecx
mov dword [0x415424], 1
call fcn.0040a850
mov eax, 1
jmp 0x40abe6
call fcn.0040a850
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc