Function at 0x405200
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 [0x409380], 0
je 0x40521d
mov eax, 1
jmp 0x405526
call fcn.00405190
push str.IniRegistryLib_is_getting_loaded._r_n
call fcn.00405190
add esp, 4
cmp dword [ebp + 0xc], 0
je 0x40526c
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 0x405244
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 0x405273
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 0x409590
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 0x40551f
mov eax, dword [ebp - 0x2c]
lea ecx, [eax*2 + 0x40958e]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
push edx
push str._s__r_n
call fcn.00405190
add esp, 8
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], 0
cmp dword [ebp - 0x20], 0
jne 0x405311
cmp dword [ebp - 0xc], 0x409590
jbe 0x405311
cmp dword [ebp - 0x28], 0
jne 0x4052f5
mov eax, dword [ebp - 0xc]
movzx ecx, word [eax]
cmp ecx, 0x2e
jne 0x4052f3
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x28], edx
jmp 0x405306
mov eax, dword [ebp - 0xc]
movzx ecx, word [eax]
cmp ecx, 0x5c
jne 0x405306
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0xc]
sub eax, 2
mov dword [ebp - 0xc], eax
jmp 0x4052cd
cmp dword [ebp - 0x20], 0
je 0x40551f
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 0x405352
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 0x4053ca
mov eax, dword [ebp - 0x30]
sub eax, 0x409590
sar eax, 1
mov ecx, dword [ebp - 0x2c]
sub ecx, eax
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x24], 0
jmp 0x405376
mov edx, dword [ebp - 0x24]
add edx, 1
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x24], 1
jae 0x4053b3
mov eax, dword [ebp - 0x24]
lea ecx, [eax*8 + 0x40902c]
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.004051a0
movzx edx, al
test edx, edx
je 0x4053b1
mov dword [ebp - 0x40], 1
jmp 0x40536d
mov eax, dword [ebp - 0x34]
shl eax, 1
push eax
push 0x407a7c
mov ecx, dword [ebp - 0x50]
push ecx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
cmp dword [ebp - 0x40], 0
jne 0x40551f
push 0x409590
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40551f
mov ecx, 0x82
mov esi, 0x409590
mov edi, 0x409388
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x18], 0x409388
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 0x405409
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 + 0x409386]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
movzx eax, word [edx]
cmp eax, 0x5c
je 0x405455
cmp dword [ebp - 0x10], 0x409388
jbe 0x405455
mov ecx, dword [ebp - 0x10]
sub ecx, 2
mov dword [ebp - 0x10], ecx
jmp 0x405436
xor edx, edx
mov eax, dword [ebp - 0x10]
mov word [eax], dx
mov ecx, dword [ebp - 0x10]
sub ecx, 0x409388
sar ecx, 1
add ecx, 1
mov dword [0x409378], ecx
push 0x409388
push str.wszIniRegDirectory__s__r_n
call fcn.00405190
add esp, 8
mov ecx, 0x82
mov esi, 0x409590
mov edi, 0x409798
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x1c], 0x409798
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 0x4054a4
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 + 0x409798]
mov eax, dword [str..ext]
mov dword [edx], eax
mov ecx, dword [0x407c60]
mov dword [edx + 4], ecx
mov ax, word [0x407c64]
mov word [edx + 8], ax
push 0x409798
push str.g_wszIniRegExtPath:__s__r_n
call fcn.00405190
add esp, 8
mov ecx, dword [ebp + 0x10]
mov dword [0x40937c], ecx
mov dword [0x409380], 1
call fcn.00405190
mov eax, 1
jmp 0x405526
call fcn.00405190
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc