Function at 0x422ad9
Capabilities:
Check if file exists
Get file attributes
Read .ini file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffce4
push edi
push 0x10000
push 0x40
call fcn.00401030
mov dword [ebp - 0x310], eax
push dword [ebp - 0x310]
call sub.kernel32.dll_GlobalLock
mov edi, dword [ebp - 0x310]
mov dword [ebp - 0x314], 0
xor eax, eax
mov dword [ebp - 0x308], eax
mov dword [ebp - 0x30c], eax
jmp 0x422c65
inc dword [ebp - 0x308]
lea eax, [ebp - 0x284]
push eax
push dword [ebp - 0x308]
call fcn.004011b7
push 0x45cb12
push 0x184
lea eax, [ebp - 0x184]
push eax
push 0x44ef8c
lea eax, [ebp - 0x284]
push eax
push str.Resource
call sub.kernel32.dll_GetPrivateProfileStringA
or eax, eax
je 0x422c56
mov dword [ebp - 0x30c], 0
lea eax, [ebp - 0x284]
push eax
lea eax, [ebp - 0x184]
push eax
call fcn.0040cd48
lea eax, [ebp - 0x2c4]
push eax
lea eax, [ebp - 0x184]
push eax
call fcn.0040cd48
lea eax, [ebp - 0x304]
push eax
lea eax, [ebp - 0x184]
push eax
call fcn.0040cd48
cmp dword [ebp - 0x314], 0
jne 0x422bea
cmp byte [ebp - 0x304], 0x38
jne 0x422bea
mov dword [ebp - 0x314], 1
mov dword [ebp - 0x2c4], 0x3432
push str.MANIFEST
lea eax, [ebp - 0x284]
push eax
call fcn.004010a7
dec dword [ebp - 0x308]
lea eax, [ebp - 0x2c4]
push eax
call fcn.00401168
or eax, eax
je 0x422c65
cmp byte [ebp - 0x284], 0
je 0x422c65
push str.define
push edi
call fcn.00420b04
add edi, eax
mov al, 0x20
stosb byte es:[edi], al
lea eax, [ebp - 0x284]
push eax
push edi
call fcn.00420b04
add edi, eax
sub eax, 0x1f
neg eax
cmp eax, 0x80000000
jbe 0x422c30
xor eax, eax
xor edx, edx
idiv dword [0x44f3a5]
inc eax
mov ecx, eax
mov al, 9
rep stosb byte es:[edi], al
lea eax, [ebp - 0x2c4]
push eax
push edi
call fcn.00420b04
add edi, eax
mov ax, 0xa0d
stosw word es:[edi], ax
jmp 0x422c65
inc dword [ebp - 0x30c]
cmp dword [ebp - 0x30c], 0xa
ja 0x422c75
cmp dword [ebp - 0x308], 0x100
jb 0x422b23
xor eax, eax
mov dword [ebp - 0x308], eax
mov dword [ebp - 0x30c], eax
jmp 0x422ded
inc dword [ebp - 0x308]
lea eax, [ebp - 0x284]
push eax
push dword [ebp - 0x308]
call fcn.004011b7
push 0x45cb12
push 0x184
lea eax, [ebp - 0x184]
push eax
push 0x44ef8c
lea eax, [ebp - 0x284]
push eax
push str.Resource
call sub.kernel32.dll_GetPrivateProfileStringA
or eax, eax
je 0x422dde
mov dword [ebp - 0x30c], 0
lea eax, [ebp - 0x284]
push eax
lea eax, [ebp - 0x184]
push eax
call fcn.0040cd48
lea eax, [ebp - 0x2c4]
push eax
lea eax, [ebp - 0x184]
push eax
call fcn.0040cd48
cmp byte [ebp - 0x284], 0
je 0x422d10
lea eax, [ebp - 0x284]
jmp 0x422d16
lea eax, [ebp - 0x2c4]
push eax
push edi
call fcn.00420b04
add edi, eax
sub eax, 0x17
neg eax
cmp eax, 0
jge 0x422d2b
xor eax, eax
xor edx, edx
idiv dword [0x44f3a5]
inc eax
mov ecx, eax
mov al, 9
rep stosb byte es:[edi], al
lea eax, [ebp - 0x284]
push eax
lea eax, [ebp - 0x184]
push eax
call fcn.0040cd48
lea eax, [ebp - 0x284]
push eax
call fcn.00401168
push eax
push str.BITMAP____CURSOR____ICON______IMAGE_____MIDI______WAVE______AVI_______RCDATA____MANIFEST__FONT______ANICURSOR_RT_HTML
lea eax, [ebp - 0x284]
push eax
call fcn.004010a7
pop eax
inc eax
jmp 0x422d85
push eax
lea eax, [ebp - 0x2c4]
push eax
lea eax, [ebp - 0x284]
push eax
call fcn.0040cd48
pop eax
dec eax
or eax, eax
jne 0x422d6f
lea eax, [ebp - 0x2c4]
push eax
push edi
call fcn.00420b04
add edi, eax
mov al, 0x20
stosb byte es:[edi], al
push str.DISCARDABLE
push edi
call fcn.00420b04
add edi, eax
mov al, 0x20
stosb byte es:[edi], al
mov al, 0x22
stosb byte es:[edi], al
lea eax, [ebp - 0x184]
jmp 0x422dbf
cmp byte [eax], 0x5c
jne 0x422dbe
mov byte [eax], 0x2f
inc eax
cmp byte [eax], 0
jne 0x422db6
lea eax, [ebp - 0x184]
push eax
push edi
call fcn.00420b04
add edi, eax
mov al, 0x22
stosb byte es:[edi], al
mov ax, 0xa0d
stosw word es:[edi], ax
jmp 0x422ded
inc dword [ebp - 0x30c]
cmp dword [ebp - 0x30c], 0xa
ja 0x422dfd
cmp dword [ebp - 0x308], 0x100
jb 0x422c88
cmp dword [ebp + 8], 0
je 0x422e24
push 2
call fcn.0042ec60
call fcn.004305a1
call fcn.0042ed4b
push dword [ebp - 0x310]
call fcn.00430605
jmp 0x422fde
push 0x45cb12
push 0x184
lea eax, [ebp - 0x184]
push eax
push 0x44ef8c
push str.Res.rc
push 0x44f7f1
call sub.kernel32.dll_GetPrivateProfileStringA
or eax, eax
jne 0x422e9a
mov dword [ebp - 0x184], 0x31
push 0x45cb12
lea eax, [ebp - 0x184]
push eax
push str.Res.rc
push 0x44f7f1
call sub.kernel32.dll_WritePrivateProfileStringA
mov dword [ebp - 0x184], 0
push 0x4000000
lea eax, [ebp - 0x184]
push eax
push 1
push 0x47b
push dword [0x4538b0]
call fcn.00408423
mov word [ebp - 0x184], 0x30
push 0x45cb12
push 0x184
lea eax, [ebp - 0x184]
push eax
push 0x44ef8c
lea eax, [ebp - 0x184]
push eax
push str.MakeFiles
call sub.kernel32.dll_GetPrivateProfileStringA
lea eax, [ebp - 0x184]
push eax
call fcn.004010ef
sub eax, 4
mov byte ss:[eax + ebp - 0x184], 0
push 0x45de5e
lea eax, [ebp - 0x284]
push eax
call fcn.004010a7
push str.Res_
lea eax, [ebp - 0x284]
push eax
call fcn.004010c5
lea eax, [ebp - 0x184]
push eax
lea eax, [ebp - 0x284]
push eax
call fcn.004010c5
push str.Res.rc
lea eax, [ebp - 0x284]
push eax
call fcn.004010c5
lea eax, [ebp - 0x284]
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x422f55
push 0x800000
push 0x45cb12
push 0xfffffffffffffffe
push 0x478
push dword [0x4538b0]
call fcn.00408423
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x284]
push eax
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
je 0x422fde
mov dword [ebp - 0x318], eax
push dword [ebp - 0x310]
call fcn.004010ef
mov dword [ebp - 0x31c], eax
push 0
lea eax, [ebp - 0x31c]
push eax
push dword [ebp - 0x31c]
push dword [ebp - 0x310]
push dword [ebp - 0x318]
call sub.kernel32.dll_WriteFile
push dword [ebp - 0x318]
call sub.kernel32.dll_CloseHandle
inc dword [0x44f339]
push 0x2000
lea eax, [ebp - 0x284]
push eax
push 4
push 0x48e
push dword [0x4538b0]
call fcn.00408423
push dword [ebp - 0x310]
call sub.kernel32.dll_GlobalUnlock
push dword [ebp - 0x310]
call sub.kernel32.dll_GlobalFree
pop edi
leave
ret 4