Function at 0x404e70
Capabilities:
Enumerate files on windows
Get file size
Get file version info
Read file on windows
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4200c6
mov eax, dword fs:[0]
push eax
sub esp, 0x394
mov eax, dword [0x42b008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [0x430da0], 0
je 0x405777
xor ecx, ecx
mov dword [ebp - 4], 1
call fcn.004011d0
xor ecx, ecx
mov dword [ebp - 0x378], 0
mov dword [ebp - 0x370], 0
mov dword [ebp - 0x374], 0
call fcn.004011d0
push 0x42c5e8
mov dword [ebp - 0x36c], 0
mov dword [ebp - 0x364], 0
mov dword [ebp - 0x368], 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
xor esi, esi
cmp dword [0x430db8], esi
jle 0x404f28
mov ecx, dword [0x430db4]
mov ecx, dword [ecx + esi*4]
call fcn.004011d0
inc esi
cmp esi, dword [0x430db8]
jl 0x404f11
mov ecx, dword [0x430db4]
call fcn.004011d0
lea eax, [ebp - 0x358]
mov dword [0x430db4], 0
push eax
push 0x426960
mov dword [0x430dbc], 0
mov dword [0x430db8], 0
mov dword [ebp - 0x358], 0x10
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4050a4
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov edi, edi
mov ecx, str.en.ini
lea eax, [ebp - 0x32c]
jmp 0x404f90
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404fb0
test dl, dl
je 0x404fac
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404fb0
add eax, 2
add ecx, 2
test dl, dl
jne 0x404f90
xor eax, eax
jmp 0x404fb5
sbb eax, eax
or eax, 1
test eax, eax
je 0x40508d
push 1
lea eax, [ebp - 0x32c]
push 0x4269cc
push eax
call fcn.00411020
add esp, 0xc
test eax, eax
je 0x40508d
push 2
lea eax, [ebp - 0x32c]
push 0x4269d0
push eax
call fcn.00411020
add esp, 0xc
test eax, eax
je 0x40508d
test byte [ebp - 0x358], 0x10
je 0x40508d
lea edx, [ebp - 0x32c]
mov ecx, str.Pack.ini
call fcn.00401920
mov esi, eax
test esi, esi
je 0x40508d
mov eax, dword [ebp - 0x368]
lea ecx, [ebp - 0x36c]
inc eax
push eax
call fcn.0040a8b0
mov eax, dword [ebp - 0x368]
mov ecx, dword [ebp - 0x36c]
mov dword [ecx + eax*4 - 4], esi
mov ecx, 0x104
call fcn.004011a0
mov ecx, dword [ebp - 0x374]
mov esi, eax
inc ecx
push ecx
lea ecx, [ebp - 0x378]
call fcn.0040a8b0
mov eax, dword [ebp - 0x374]
lea edx, [ebp - 0x32c]
mov ecx, dword [ebp - 0x378]
mov dword [ecx + eax*4 - 4], esi
test eax, eax
jne 0x405079
int3
mov ecx, esi
jmp 0x405080
mov al, byte [edx]
lea ecx, [ecx + 1]
inc edx
mov byte [ecx - 1], al
test al, al
jne 0x405080
lea eax, [ebp - 0x358]
push eax
push edi
call ebx
neg eax
sbb eax, eax
inc eax
test eax, eax
je 0x404f80
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x42c4e0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
xor ecx, ecx
mov dword [ebp - 0x35c], ecx
cmp dword [0x430da0], ecx
jle 0x4056f4
lea ebx, [ebx]
mov eax, dword [0x430d9c]
xor esi, esi
mov dword [ebp - 0x388], esi
mov dword [ebp - 0x38c], 0xffffffff
mov ebx, dword [eax + ecx*4]
lea eax, [ebp - 0x390]
push eax
push ebx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeA]
mov edi, eax
test edi, edi
je 0x405163
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x405163
push esi
push edi
push 0
push ebx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoA]
test eax, eax
je 0x40515c
lea eax, [ebp - 0x390]
mov dword [ebp - 0x360], 0
push eax
lea eax, [ebp - 0x360]
push eax
push 0x426968
push esi
call dword [sym.imp.VERSION.dll_VerQueryValueA]
test eax, eax
je 0x40515c
mov eax, dword [ebp - 0x360]
push esi
mov ebx, dword [eax + 8]
mov dword [ebp - 0x380], ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40516d
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x380], 0
mov eax, dword [0x430d9c]
mov ecx, dword [ebp - 0x35c]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push dword [eax + ecx*4]
mov dword [ebp - 0x384], 0
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x4051c0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov dword [ebp - 0x384], eax
call ebx
jmp 0x4051c6
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x430d9c]
mov esi, dword [ebp - 0x35c]
mov ecx, dword [ecx + esi*4]
call fcn.004035f0
test eax, eax
je 0x405389
mov eax, dword [0x430d9c]
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push dword [eax + esi*4]
call edi
mov edi, eax
cmp edi, 0xffffffff
je 0x405389
push 0
push 0
push 0x955b8
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x39c]
push eax
push 0x100
lea eax, [ebp - 0x218]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405386
mov ecx, 0x104
call fcn.004011a0
mov ecx, dword [0x430db8]
mov esi, eax
inc ecx
push ecx
mov ecx, 0x430db4
call fcn.0040a970
mov ecx, dword [0x430db4]
mov edx, dword [0x430db8]
mov dword [ecx + edx*4 - 4], esi
mov ecx, dword [0x430db8]
test ecx, ecx
jne 0x405276
int3
lea eax, [ebp - 0x218]
push eax
mov eax, dword [0x430db4]
push dword [eax + ecx*4 - 4]
call fcn.00401180
lea eax, [ebp - 0x218]
push eax
push 0x42c5e8
push str._s_spack.ini
call fcn.004015c0
add esp, 0x14
xor edx, edx
mov ecx, eax
call fcn.00401920
push 0x4272b8
mov ebx, eax
push 0
push str.Settings
mov ecx, ebx
call fcn.00402460
push eax
mov ecx, ebx
call fcn.004027e0
push eax
lea eax, [ebp - 0x118]
push 0x426a44
push eax
call fcn.00401180
add esp, 0xc
lea ecx, [ebp - 0x118]
call fcn.00403130
mov ecx, dword [0x430df8]
mov esi, eax
inc ecx
push ecx
mov ecx, 0x430df4
call fcn.0040a970
mov ecx, dword [0x430df4]
mov edx, dword [0x430df8]
push str.en.ini
push 0
push str.Language
mov dword [ecx + edx*4 - 4], esi
mov ecx, ebx
call fcn.00402460
push eax
mov ecx, ebx
call fcn.004027e0
mov edx, eax
lea ecx, [ebp - 0x118]
call fcn.00403240
mov ecx, dword [0x430dd0]
mov esi, eax
inc ecx
push ecx
mov ecx, 0x430dcc
call fcn.0040a970
mov edx, dword [0x430dd0]
mov ecx, dword [0x430dcc]
mov dword [ecx + edx*4 - 4], esi
test ebx, ebx
je 0x40537a
mov ecx, ebx
call fcn.004019e0
mov ecx, dword [ebx]
call fcn.004011d0
push 0x225
push ebx
call fcn.0040b1b3
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4056db
push edi
call ebx
xor ebx, ebx
cmp dword [ebp - 0x368], ebx
jle 0x40562b
jmp 0x4053a0
mov eax, dword [ebp - 0x36c]
xor esi, esi
push 0xbaadf00d
push esi
push str.Autodetect
mov edi, dword [eax + ebx*4]
mov ecx, edi
call fcn.00402460
push eax
mov ecx, edi
call fcn.004027a0
mov dword [ebp - 0x394], eax
mov eax, dword [ebp - 0x36c]
push 0xbaadf00d
push 1
push str.Autodetect
mov edi, dword [eax + ebx*4]
mov ecx, edi
call fcn.00402460
push eax
mov ecx, edi
call fcn.004027a0
mov dword [ebp - 0x398], eax
mov eax, dword [ebp - 0x36c]
push 0xbaadf00d
push 2
push str.Autodetect
mov edi, dword [eax + ebx*4]
mov ecx, edi
call fcn.00402460
push eax
mov ecx, edi
call fcn.004027a0
mov dword [ebp - 0x360], eax
mov eax, dword [ebp - 0x36c]
push 0xbaadf00d
push 3
push str.Autodetect
mov edi, dword [eax + ebx*4]
mov ecx, edi
call fcn.00402460
push eax
mov ecx, edi
call fcn.004027a0
mov edi, eax
cmp dword [ebp - 0x360], esi
je 0x4054e1
test edi, edi
je 0x4054e1
mov ecx, dword [0x430d9c]
mov eax, dword [ebp - 0x35c]
push esi
push 0x80
push 3
push esi
push esi
push 0x80000000
push dword [ecx + eax*4]
mov dword [ebp - 0x37c], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4054dc
mov ecx, dword [ebp - 0x360]
push 0
push 0
add ecx, 0xffc00000
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x3a0]
push eax
push 4
lea eax, [ebp - 0x37c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4054d5
cmp dword [ebp - 0x37c], edi
jne 0x4054d5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 1
jmp 0x4054e1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 0xfffffffd
mov eax, dword [ebp - 0x394]
test eax, eax
je 0x4054f9
cmp dword [ebp - 0x380], eax
jne 0x4054f6
inc esi
jmp 0x4054f9
sub esi, 3
mov eax, dword [ebp - 0x398]
test eax, eax
je 0x405511
cmp dword [ebp - 0x384], eax
jne 0x40550e
inc esi
jmp 0x405511
sub esi, 3
cmp esi, dword [ebp - 0x388]
jle 0x405529
mov edi, ebx
mov dword [ebp - 0x388], esi
mov dword [ebp - 0x38c], edi
jmp 0x40552f
mov edi, dword [ebp - 0x38c]
inc ebx
cmp ebx, dword [ebp - 0x368]
jl 0x4053a0
cmp edi, 0xffffffff
je 0x40562b
mov ecx, 0x104
call fcn.004011a0
mov ecx, dword [0x430db8]
mov esi, eax
inc ecx
push ecx
mov ecx, 0x430db4
call fcn.0040a970
mov ecx, dword [0x430db4]
mov edx, dword [0x430db8]
mov dword [ecx + edx*4 - 4], esi
mov ecx, dword [0x430db8]
test ecx, ecx
jne 0x40557e
int3
mov eax, dword [ebp - 0x378]
push dword [eax + edi*4]
mov eax, dword [0x430db4]
push dword [eax + ecx*4 - 4]
call fcn.00401180
mov ebx, dword [ebp - 0x36c]
add esp, 8
mov esi, dword [ebx + edi*4]
mov ecx, esi
push 0x4272ec
push 0
push str.Settings
call fcn.00402460
push eax
mov ecx, esi
call fcn.004027e0
push eax
lea eax, [ebp - 0x118]
push 0x426a44
push eax
call fcn.00401180
add esp, 0xc
lea ecx, [ebp - 0x118]
call fcn.00403130
mov ecx, dword [0x430df8]
mov esi, eax
inc ecx
push ecx
mov ecx, 0x430df4
call fcn.0040a970
mov ecx, dword [0x430df4]
mov edx, dword [0x430df8]
push str.en.ini
push 0
push str.Language
mov dword [ecx + edx*4 - 4], esi
mov esi, dword [ebx + edi*4]
mov ecx, esi
call fcn.00402460
push eax
mov ecx, esi
call fcn.004027e0
mov edx, eax
lea ecx, [ebp - 0x118]
jmp 0x4056b2
mov ecx, 0x104
call fcn.004011a0
mov ecx, dword [0x430db8]
mov esi, eax
inc ecx
push ecx
mov ecx, 0x430db4
call fcn.0040a970
mov ecx, dword [0x430db4]
mov edx, dword [0x430db8]
mov dword [ecx + edx*4 - 4], esi
mov ecx, dword [0x430db8]
test ecx, ecx
jne 0x405664
int3
mov eax, dword [0x430db4]
push str.default
push dword [eax + ecx*4 - 4]
call fcn.00401180
add esp, 8
mov ecx, 0x4272ec
call fcn.00403130
mov ecx, dword [0x430df8]
mov esi, eax
inc ecx
push ecx
mov ecx, 0x430df4
call fcn.0040a970
mov edx, dword [0x430df8]
mov ecx, dword [0x430df4]
mov dword [ecx + edx*4 - 4], esi
mov edx, str.en.ini
mov ecx, 0x4272ec
call fcn.00403240
mov ecx, dword [0x430dd0]
mov esi, eax
inc ecx
push ecx
mov ecx, 0x430dcc
call fcn.0040a970
mov edx, dword [0x430dd0]
mov ecx, dword [0x430dcc]
mov dword [ecx + edx*4 - 4], esi
mov ecx, dword [ebp - 0x35c]
inc ecx
mov dword [ebp - 0x35c], ecx
cmp ecx, dword [0x430da0]
jl 0x4050d0
mov ebx, dword [ebp - 0x374]
xor esi, esi
test ebx, ebx
jle 0x405713
mov eax, dword [ebp - 0x378]
mov ecx, dword [eax + esi*4]
call fcn.004011d0
inc esi
cmp esi, ebx
jl 0x405700
mov ebx, dword [ebp - 0x368]
xor edi, edi
test ebx, ebx
jle 0x405753
mov eax, dword [ebp - 0x36c]
mov esi, dword [eax + edi*4]
test esi, esi
je 0x40574e
mov ecx, esi
call fcn.004019e0
mov ecx, dword [esi]
call fcn.004011d0
push 0x225
push esi
call fcn.0040b1b3
mov eax, dword [ebp - 0x36c]
add esp, 8
inc edi
cmp edi, ebx
jl 0x405725
mov ecx, dword [ebp - 0x378]
call fcn.004011d0
mov ecx, dword [ebp - 0x36c]
call fcn.004011d0
xor ecx, ecx
call fcn.004011d0
xor ecx, ecx
call fcn.004011d0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040acdd
mov esp, ebp
pop ebp
ret