Function at 0x4091f0
Capabilities:
Check if file exists
Check mutex on windows
Read file on windows
Set current directory

Disassembly:
push ebp
lea ebp, [esp - 0x254]
sub esp, 0x254
push 0xffffffffffffffff
push 0x450276
mov eax, dword fs:[0]
push eax
sub esp, 0xdc
mov eax, dword [0x478024]
xor eax, ebp
mov dword [ebp + 0x250], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x28], edi
lea eax, [ebp - 0x10]
push eax
call fcn.00409d10
mov dword [ebp - 4], 0
lea esi, [edi + 0x180]
push eax
mov ecx, esi
mov dword [ebp - 0x24], esi
call fcn.00407c70
mov dword [ebp - 4], 0xffffffff
or ebx, 0xffffffff
mov edx, dword [ebp - 0x10]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x409276
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, esi
lea ecx, [ebp - 0x10]
call fcn.004109c0
mov dword [ebp - 4], 2
lea ecx, [edi + 0x188]
push eax
call fcn.00407c70
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4092b4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [edi + 0x188]
lea esi, [edi + 0x184]
push eax
mov ecx, esi
call fcn.00407c70
mov edx, dword [esi]
mov edi, dword [edx - 0xc]
test edi, edi
jle 0x409332
lea eax, [edi - 1]
test eax, eax
js 0x40978f
cmp eax, edi
jg 0x40978f
cmp word [edx + eax*2], 0x5c
je 0x409332
lea eax, [edi + 1]
mov ecx, 1
sub ecx, dword [edx - 4]
mov dword [ebp - 0x10], eax
mov eax, dword [edx - 8]
sub eax, dword [ebp - 0x10]
or eax, ecx
jge 0x409310
lea eax, [edi + 1]
mov ecx, esi
push eax
call fcn.00403ef0
mov edx, dword [esi]
mov eax, 0x5c
lea ecx, [edi + 1]
mov word [edx + edi*2], ax
mov eax, dword [esi]
cmp ecx, dword [eax - 8]
jg 0x40978f
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [esi]
mov word [eax + ecx*2], dx
lea eax, [ebp - 0x10]
push eax
call fcn.00409e20
mov dword [ebp - 4], 4
mov ecx, esi
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.00403530
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x409370
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 4
push str..ini
mov ecx, esi
call fcn.00403530
lea eax, [ebp]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x44], 0x465524
mov dword [ebp - 0x40], eax
mov dword [ebp - 4], 6
cmp eax, 0xffffffff
jne 0x4093aa
xor esi, esi
jmp 0x40974a
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], 0x46844c
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x38], 0x468434
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov byte [ebp - 4], 9
mov eax, dword [ebp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x10], eax
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
je 0x4094df
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x18], 0x46552c
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 0xa
cmp esi, 0xffffffff
jne 0x40942e
mov byte [ebp - 4], 9
mov dword [ebp - 0x18], 0x46552c
push eax
jmp 0x4094d6
sub dword [ebp - 0x10], 2
lea eax, [ebp - 0x48]
push 0
push eax
push 2
push esi
mov dword [ebp - 0x4c], 2
mov dword [ebp - 0x48], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4094c6
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x1c]
shr eax, 1
push eax
push 0x78
call fcn.00412010
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x1c]
cmp dword [eax - 4], 1
jle 0x40947f
push dword [eax - 0xc]
lea ecx, [ebp - 0x1c]
call fcn.00403e10
mov eax, dword [ebp - 0x1c]
push 0
lea ecx, [ebp - 0x20]
push ecx
push dword [ebp - 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4094a8
cmp dword [ebp - 0x20], 0
je 0x4094a8
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x38]
call fcn.0041c060
jmp 0x4094a8
mov byte [ebp - 4], 0xa
mov eax, ebx
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4094c6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 9
mov dword [ebp - 0x18], 0x46552c
test esi, esi
je 0x4094df
push esi
call edi
mov dword [ebp - 0x14], 0
push ecx
lea ecx, [ebp - 0xe8]
call fcn.00412470
mov byte [ebp - 4], 0xe
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0xe8]
call fcn.004130a0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x38]
push eax
mov ecx, edi
call fcn.0040ae20
lea ecx, [ebp - 0x54]
call fcn.0040b220
mov byte [ebp - 4], 0xf
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x38]
call fcn.0041b740
test al, al
je 0x409574
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x10]
call fcn.00407510
mov byte [ebp - 4], 0x10
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0xc], 0
je 0x409556
lea eax, [ebp - 0x10]
mov byte [0x479ee0], 1
push eax
mov ecx, 0x479ea8
call fcn.00420af0
mov byte [ebp - 4], 0xf
mov eax, ebx
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x409574
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x54]
call fcn.0040b2f0
lea ecx, [ebp - 0xe8]
call fcn.00412bb0
test al, al
mov byte [edi + 5], al
lea eax, [edi + 0x180]
push eax
lea ecx, [edi + 8]
sete byte [0x478a90]
call fcn.004155b0
lea ecx, [ebp - 0xe8]
call fcn.00412f10
push eax
lea ecx, [edi + 0x74]
call fcn.00407c70
push ecx
mov dword [edi + 0x4c], 0
or dword [edi + 0x4c], 3
mov byte [edi + 0xc8], 1
mov dword [edi + 0x98], 3
add edi, 0x108
push 0
push 0xdc
mov ecx, edi
call fcn.00418150
push dword [ebp - 0x24]
mov ecx, edi
call fcn.00407c70
push edi
lea ecx, [edi + 8]
call fcn.00407c70
lea ecx, [edi + 8]
call fcn.0042b7d0
mov edx, 0xa1
lea ecx, [ebp - 0x10]
call fcn.0042b080
mov byte [ebp - 4], 0x12
lea eax, [edi + 4]
push dword [edi + 8]
push dword [ebp - 0x10]
push eax
call fcn.004121e0
add esp, 0xc
mov byte [ebp - 4], 0xe
mov eax, ebx
mov esi, dword [ebp - 0x10]
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x409647
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x24]
lea ecx, [ebp - 0x20]
call fcn.004109c0
mov byte [ebp - 4], 0x14
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov byte [ebp - 4], 0xe
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40967a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.Global_MSIExecute
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov esi, eax
mov dword [ebp - 0x18], 0x46552c
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 0x16
test esi, esi
jne 0x4096c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4096b8
mov byte [ebp - 4], 0xe
mov dword [ebp - 0x18], 0x46552c
jmp 0x4096ec
mov byte [ebp - 4], 0xe
mov dword [ebp - 0x18], 0x46552c
jmp 0x40971d
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x409703
mov byte [ebp - 4], 0xe
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov dword [ebp - 0x18], 0x46552c
call eax
mov dword [ebp - 0x14], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0xe8]
push eax
mov ecx, edi
call fcn.0040a2d0
mov esi, eax
mov dword [edi], esi
jmp 0x409722
mov byte [ebp - 4], 0xe
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov dword [ebp - 0x18], 0x46552c
call eax
mov dword [ebp - 0x14], 0
mov esi, 1
mov byte [ebp - 4], 9
lea ecx, [ebp - 0xe8]
call fcn.004097f0
mov byte [ebp - 4], 6
lea eax, [ebp - 0x38]
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x34]
call fcn.0040c460
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x44], 0x465524
test eax, eax
je 0x40976a
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp - 0x40], 0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x250]
xor ecx, ebp
call fcn.00438889
lea esp, [ebp + 0x254]
pop ebp
ret
push 0x80070057
call fcn.00404020
int3