Function at 0x4047b0
Capabilities:
Enumerate files on windows
Get file size
Get file version info
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x17c
mov eax, dword [0x42b008]
xor eax, esp
mov dword [esp + 0x178], eax
push ebx
push esi
push edi
lea eax, [esp + 0x28]
mov dword [esp + 0xc], 0
push eax
push 0x427238
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
jne 0x404805
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x178]
xor ecx, esp
call fcn.0040acdd
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x404810
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
lea eax, [esp + 0x6c]
mov dword [esp + 0x2c], 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40485a
lea eax, [esp + 0x14]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, eax
call ebx
cmp edi, 0xffffffff
je 0x40485a
cmp edi, 0x2625a0
ja 0x404879
push str.Heroes3.exe
lea ecx, [esp + 0x58]
call fcn.00401250
push eax
call fcn.004110d3
add esp, 8
test eax, eax
jne 0x404a74
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeA]
mov esi, eax
test esi, esi
je 0x404a74
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x404a74
push edi
push esi
push 0
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoA]
test eax, eax
je 0x404a6d
lea eax, [esp + 0x18]
mov dword [esp + 0x10], 0
push eax
lea eax, [esp + 0x14]
push eax
push 0x426968
push edi
call dword [sym.imp.VERSION.dll_VerQueryValueA]
test eax, eax
je 0x404a6d
mov eax, dword [esp + 0x10]
push edi
mov esi, dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp esi, 0x30000
jb 0x404a74
push str.h3hota_maped.exe
lea ecx, [esp + 0x58]
call fcn.00401250
push eax
call fcn.004110d3
add esp, 8
test eax, eax
je 0x404a74
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
lea eax, [esp + 0x54]
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x404994
push 0
push 0
push 0x955ad
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x24]
push eax
push 0xa
lea eax, [esp + 0x178]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404991
push 9
lea eax, [esp + 0x170]
push str.HiRez.dll
push eax
call fcn.00410e9d
add esp, 0xc
test eax, eax
jne 0x404991
push esi
call ebx
jmp 0x404a74
push esi
call ebx
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
lea eax, [esp + 0x6c]
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x404a03
push 0
push 0
push 0x25c6dc
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x28]
push eax
push 0xa
lea eax, [esp + 0x184]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404a00
push 9
lea eax, [esp + 0x17c]
push str._HD3_.dll
push eax
call fcn.00411020
add esp, 0xc
test eax, eax
jne 0x404a00
push esi
call ebx
jmp 0x404a74
push esi
call ebx
lea ecx, [esp + 0x54]
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404a10
sub ecx, edx
inc ecx
call fcn.004011a0
mov esi, eax
mov eax, dword [0x430da0]
inc eax
push eax
call fcn.0040aa30
mov ecx, dword [0x430da0]
lea edx, [esp + 0x54]
mov eax, dword [0x430d9c]
mov dword [eax + ecx*4 - 4], esi
mov ecx, dword [0x430da0]
test ecx, ecx
jne 0x404a4b
int3
mov eax, dword [0x430d9c]
mov eax, dword [eax + ecx*4 - 4]
mov cl, byte [edx]
lea edx, [edx + 1]
mov byte [eax], cl
lea eax, [eax + 1]
test cl, cl
jne 0x404a54
mov edi, 1
mov dword [esp + 0xc], edi
jmp 0x404a78
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, dword [esp + 0xc]
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x404810
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x184]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040acdd
mov esp, ebp
pop ebp
ret