Function at 0x407ce8
Capabilities:
Get file size
Link many functions at runtime
Read .ini file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x47
push 0
push 0
dec ecx
jne 0x407cf0
push ebx
push esi
push edi
mov dword [ebp - 0x28], eax
xor eax, eax
push ebp
push 0x4087a9
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x24]
push eax
mov ecx, 0x4087c0
mov edx, 0x4087d8
mov eax, 0x80000002
call fcn.004073dc
mov eax, 0x420810
call fcn.00404658
lea eax, [ebp - 0x188]
push eax
mov ecx, 2
xor edx, edx
mov eax, dword [ebp - 0x24]
call fcn.00404b2c
mov eax, dword [ebp - 0x188]
call fcn.00407364
cmp eax, 0xd
jl 0x407dd9
lea edx, [ebp - 0x190]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x190]
push 0x408804
push 0x408820
lea eax, [ebp - 0x18c]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x18c]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
lea edx, [ebp - 0x198]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x198]
push 0x408804
push 0x408838
lea eax, [ebp - 0x194]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x194]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
lea edx, [ebp - 0x1a0]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x1a0]
push 0x408804
push 0x408850
lea eax, [ebp - 0x19c]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x19c]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
lea edx, [ebp - 0x1a8]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x1a8]
push 0x408804
push 0x408868
lea eax, [ebp - 0x1a4]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x1a4]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
lea edx, [ebp - 0x1b0]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x1b0]
push 0x408804
push 0x40887c
lea eax, [ebp - 0x1ac]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x1ac]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
lea edx, [ebp - 0x1b8]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x1b8]
push 0x408804
push 0x408894
lea eax, [ebp - 0x1b4]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x1b4]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
lea edx, [ebp - 0x1c0]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x1c0]
push 0x408804
push 0x4088a8
lea eax, [ebp - 0x1bc]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x1bc]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
lea edx, [ebp - 0x1c8]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x1c8]
push 0x408804
push 0x4088bc
lea eax, [ebp - 0x1c4]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x1c4]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
lea edx, [ebp - 0x1d0]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x1d0]
push 0x408804
push 0x4088d0
lea eax, [ebp - 0x1cc]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x1cc]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
lea edx, [ebp - 0x1d8]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x1d8]
push 0x408804
push 0x4088e8
lea eax, [ebp - 0x1d4]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x1d4]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
lea edx, [ebp - 0x1e0]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x1e0]
push 0x408804
push 0x4088fc
lea eax, [ebp - 0x1dc]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x1dc]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
lea edx, [ebp - 0x1e8]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x1e8]
push 0x408804
push 0x4088d0
lea eax, [ebp - 0x1e4]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x1e4]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
lea edx, [ebp - 0x1f0]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x1f0]
push 0x408804
push 0x408910
lea eax, [ebp - 0x1ec]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x1ec]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
lea edx, [ebp - 0x1f8]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x1f8]
push 0x408804
push 0x408928
lea eax, [ebp - 0x1f4]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x1f4]
call fcn.00407cb4
test al, al
je 0x40818c
lea edx, [ebp - 0x200]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x200]
push 0x408804
push 0x408928
lea eax, [ebp - 0x1fc]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x1fc]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
mov edi, eax
push 0x408934
push edi
call sub.KERNEL32.DLL_GetProcAddress_1
mov dword [ebp - 0x2c], eax
push 0x408940
push edi
call sub.KERNEL32.DLL_GetProcAddress_1
mov dword [ebp - 0x30], eax
push 0x408958
push edi
call sub.KERNEL32.DLL_GetProcAddress_1
mov dword [ebp - 0x34], eax
push 0x408970
push edi
call sub.KERNEL32.DLL_GetProcAddress_1
mov dword [ebp - 0x38], eax
push 0x408984
push edi
call sub.KERNEL32.DLL_GetProcAddress_1
mov dword [ebp - 0x3c], eax
push 0x408994
push edi
call sub.KERNEL32.DLL_GetProcAddress_1
mov dword [ebp - 0x40], eax
push 0x4089a4
push edi
call sub.KERNEL32.DLL_GetProcAddress_1
mov dword [ebp - 0x44], eax
push 0x4089b4
call sub.KERNEL32.DLL_LoadLibraryA
mov ebx, eax
push 0x4089c0
push ebx
call sub.KERNEL32.DLL_GetProcAddress_1
mov edi, eax
mov esi, edi
lea edx, [ebp - 0x208]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x208]
push 0x408804
push 0x40887c
lea eax, [ebp - 0x204]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x204]
call fcn.00407cb4
test al, al
je 0x40877e
lea edx, [ebp - 0x210]
mov eax, 0x26
call fcn.00407b8c
push dword [ebp - 0x210]
push 0x408804
push 0x40887c
lea eax, [ebp - 0x20c]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x20c]
call fcn.00404ac4
push eax
call sub.KERNEL32.DLL_LoadLibraryA
mov edi, eax
push 0x4089dc
push edi
call sub.KERNEL32.DLL_GetProcAddress_1
mov dword [0x420814], eax
push 0x4089ec
push edi
call sub.KERNEL32.DLL_GetProcAddress_1
mov dword [0x420818], eax
push 0x4089fc
push edi
call sub.KERNEL32.DLL_GetProcAddress_1
mov dword [0x42081c], eax
push 0x408a10
push edi
call sub.KERNEL32.DLL_GetProcAddress_1
mov dword [0x420820], eax
push 0x408a20
push edi
call sub.KERNEL32.DLL_GetProcAddress_1
mov dword [0x420824], eax
lea eax, [ebp - 0x48]
push eax
push 8
call sub.KERNEL32.DLL_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
lea edx, [ebp - 0x218]
mov eax, 0x1a
call fcn.00407b8c
push dword [ebp - 0x218]
push 0x408a38
push 0x408a54
lea eax, [ebp - 0x214]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x214]
call fcn.00404ac4
push eax
push 0x104
lea eax, [ebp - 0x169]
push eax
push 0x408a64
push 0x408a68
push 0x408a70
call sub.KERNEL32.DLL_GetPrivateProfileStringA
lea edx, [ebp - 0x220]
mov eax, 0x1a
call fcn.00407b8c
push dword [ebp - 0x220]
push 0x408a38
lea eax, [ebp - 0x224]
lea edx, [ebp - 0x169]
mov ecx, 0x105
call fcn.004048c8
push dword [ebp - 0x224]
push 0x408a84
lea eax, [ebp - 0x21c]
mov edx, 4
call fcn.004049c8
mov eax, dword [ebp - 0x21c]
call fcn.00404ac4
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call sub.KERNEL32.DLL_CreateFileA
mov edi, eax
push 0
push edi
call sub.KERNEL32.DLL_GetFileSize
mov ebx, eax
mov eax, ebx
call fcn.00402ce0
mov esi, eax
push 0
lea eax, [ebp - 0x4c]
push eax
push ebx
push esi
push edi
call sub.KERNEL32.DLL_ReadFile
push edi
call sub.KERNEL32.DLL_CloseHandle
lea eax, [ebp - 4]
mov edx, esi
call fcn.00404850
mov eax, esi
call fcn.00402cfc
mov edx, dword [ebp - 4]
mov eax, 0x408a9c
call fcn.00404bb4
mov ecx, eax
add ecx, 2
lea eax, [ebp - 4]
mov edx, 1
call fcn.00404b6c
mov eax, dword [ebp - 4]
test eax, eax
je 0x4083bb
sub eax, 4
mov eax, dword [eax]
test eax, eax
jg 0x40841e
lea edx, [ebp - 0x228]
mov eax, 0x1a
call fcn.00407b8c
push dword [ebp - 0x228]
push 0x408a38
lea eax, [ebp - 0x22c]
lea edx, [ebp - 0x169]
mov ecx, 0x105
call fcn.004048c8
push dword [ebp - 0x22c]
push 0x408aa8
lea eax, [ebp - 0x20]
mov edx, 4
call fcn.004049c8
mov eax, dword [ebp - 0x20]
call fcn.00407bd4
lea eax, [ebp - 4]
mov edx, dword [0x420810]
call fcn.004046f0
lea edx, [ebp - 0x234]
mov eax, 0x1a
call fcn.00407b8c
push dword [ebp - 0x234]
push 0x408a38
lea eax, [ebp - 0x238]
lea edx, [ebp - 0x169]
mov ecx, 0x105
call fcn.004048c8
push dword [ebp - 0x238]
lea eax, [ebp - 0x230]
mov edx, 3
call fcn.004049c8
mov eax, dword [ebp - 0x230]
call fcn.00404ac4
push eax
call dword [ebp - 0x2c]
pop ecx
test eax, eax
jne 0x40876c
call dword [ebp - 0x34]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x408769
push 0
push 1
mov eax, dword [ebp - 0x50]
push eax
call dword [ebp - 0x38]
add esp, 0xc
test eax, eax
jne 0x408761
jmp 0x408751
lea eax, [ebp - 8]
push eax
mov edx, dword [ebp - 4]
mov eax, 0x408a9c
call fcn.00404bb4
mov ecx, eax
dec ecx
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.00404b2c
mov eax, dword [ebp - 8]
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
je 0x4084e0
mov eax, dword [ebp - 0x54]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x54]
add ecx, 3
lea eax, [ebp - 4]
mov edx, 1
call fcn.00404b6c
lea eax, [ebp - 0xc]
push eax
mov edx, dword [ebp - 8]
mov eax, 0x408ac0
call fcn.00404bb4
mov ecx, eax
dec ecx
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00404b2c
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0
je 0x40852b
mov eax, dword [ebp - 0x58]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
add ecx, 2
lea eax, [ebp - 8]
mov edx, 1
call fcn.00404b6c
push dword [ebp - 0x1c]
push 0x408acc
push dword [ebp - 0xc]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.004049c8
jmp 0x408741
lea eax, [ebp - 0x10]
push eax
mov edx, dword [ebp - 8]
mov eax, 0x408ac0
call fcn.00404bb4
mov ecx, eax
dec ecx
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00404b2c
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x408588
sub ebx, 4
mov ebx, dword [ebx]
lea ecx, [ebx + 2]
lea eax, [ebp - 8]
mov edx, 1
call fcn.00404b6c
mov esi, dword [ebp - 0x10]
test esi, esi
je 0x4085a4
sub esi, 4
mov esi, dword [esi]
push esi
mov eax, dword [ebp - 0x10]
call fcn.00404ac4
push eax
lea eax, [ebp - 0x175]
push eax
push 0
call dword [ebp - 0x30]
add esp, 0x10
push 0
lea eax, [ebp - 0x181]
push eax
lea eax, [ebp - 0x175]
push eax
call dword [ebp - 0x3c]
add esp, 0xc
test eax, eax
jne 0x408647
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0x17d]
call fcn.00404850
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0x179]
call fcn.00404cf8
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x40860a
mov eax, dword [ebp - 0x5c]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jne 0x40861d
lea eax, [ebp - 0x10]
mov edx, 0x408ad8
call fcn.004046f0
push dword [ebp - 0x1c]
push 0x408acc
push dword [ebp - 0x18]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.004049c8
lea eax, [ebp - 0x175]
xor ecx, ecx
mov edx, 0xc
call fcn.004032dc
lea eax, [ebp - 0x14]
push eax
mov edx, dword [ebp - 8]
mov eax, 0x408ac0
call fcn.00404bb4
mov ecx, eax
dec ecx
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00404b2c
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x408674
sub edi, 4
mov edi, dword [edi]
lea ecx, [edi + 2]
lea eax, [ebp - 8]
mov edx, 1
call fcn.00404b6c
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
je 0x40869b
mov eax, dword [ebp - 0x60]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
push eax
mov eax, dword [ebp - 0x14]
call fcn.00404ac4
push eax
lea eax, [ebp - 0x175]
push eax
push 0
call dword [ebp - 0x30]
add esp, 0x10
push 0
lea eax, [ebp - 0x181]
push eax
lea eax, [ebp - 0x175]
push eax
call dword [ebp - 0x3c]
add esp, 0xc
test eax, eax
jne 0x408741
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0x17d]
call fcn.00404850
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0x179]
call fcn.00404cf8
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
je 0x408704
mov eax, dword [ebp - 0x64]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
jne 0x408717
lea eax, [ebp - 0x10]
mov edx, 0x408ad8
call fcn.004046f0
push dword [ebp - 0x1c]
push 0x408acc
push dword [ebp - 0x18]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.004049c8
lea eax, [ebp - 0x175]
xor ecx, ecx
mov edx, 0xc
call fcn.004032dc
mov eax, dword [ebp - 8]
call fcn.004048f4
test eax, eax
jne 0x40855b
mov eax, dword [ebp - 4]
call fcn.004048f4
test eax, eax
jne 0x4084a8
mov eax, dword [ebp - 0x50]
push eax
call dword [ebp - 0x44]
pop ecx
call dword [ebp - 0x40]
mov eax, dword [ebp - 0x1c]
call fcn.00404ac4
mov edx, eax
mov eax, dword [ebp - 0x28]
call fcn.00404850
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4087b0
lea eax, [ebp - 0x238]
mov edx, 0x2d
call fcn.0040467c
lea eax, [ebp - 0x24]
mov edx, 9
call fcn.0040467c
ret