Function at 0x40c7f0
Capabilities:
Get file size
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4bdfaf
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x4ef6a0]
xor eax, esp
mov dword [esp + 0xdc], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4ef6a0]
xor eax, esp
push eax
lea eax, [esp + 0xf4]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x1c], edi
lea esi, [esp + 0x40]
mov eax, edi
mov dword [esp + 0xfc], 0
call fcn.00426b50
mov esi, eax
push 0x4cffcc
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x58]
push ecx
mov byte [esp + 0x108], 1
call fcn.0040dd30
push esi
push eax
lea edx, [esp + 0x6c]
push edx
mov byte [esp + 0x114], 2
call fcn.0040dc70
push 0x4cffcc
push eax
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0x120], 3
call fcn.0040dd30
push str.rif.dat
push eax
lea ecx, [esp + 0x60]
push ecx
mov byte [esp + 0x12c], 4
call fcn.0040dd30
add esp, 0x30
mov byte [esp + 0xfc], 6
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c8d7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 7
mov eax, dword [esp + 0x58]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c8ff
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 8
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c927
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 9
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c94f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esi, [esp + 0x48]
mov eax, edi
call fcn.00426b50
mov esi, eax
push 0x4cffcc
lea ecx, [esp + 0x108]
push ecx
lea edx, [esp + 0x68]
push edx
mov byte [esp + 0x108], 0xa
call fcn.0040dd30
push esi
push eax
lea eax, [esp + 0x50]
push eax
mov byte [esp + 0x114], 0xb
call fcn.0040dc70
push 0x4cffcc
push eax
lea ecx, [esp + 0x64]
push ecx
mov byte [esp + 0x120], 0xc
call fcn.0040dd30
push str.arif.dat
push eax
lea edx, [esp + 0x64]
push edx
mov byte [esp + 0x12c], 0xd
call fcn.0040dd30
add esp, 0x30
mov byte [esp + 0xfc], 0xf
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c9ea
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 0x10
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ca12
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 0x11
mov eax, dword [esp + 0x60]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ca3a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 0x12
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ca62
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.004768e7
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40ca7c
push 0x80004005
call fcn.00404150
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x14], ebp
push 0
push 0x80
push 3
push 0
push 3
mov byte [esp + 0x110], 0x13
mov ecx, dword [esp + 0x48]
push SysReAllocString
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40ccbf
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov eax, 0xd41d41d5
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 7
test ecx, ecx
jle 0x40ccbf
mov dword [esp + 0x18], ecx
push 0x8c
lea edx, [esp + 0x68]
push 0
push edx
call fcn.0049be70
add esp, 0xc
push 0
lea eax, [esp + 0x58]
push eax
push 0x8c
lea ecx, [esp + 0x70]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea esi, [esp + 0x20]
mov eax, edi
call fcn.00426b50
mov esi, eax
push 0x4cffcc
lea edx, [esp + 0x108]
push edx
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x108], 0x14
call fcn.0040dd30
push esi
push eax
lea ecx, [esp + 0x44]
push ecx
mov byte [esp + 0x114], 0x15
call fcn.0040dc70
push 0x4cffcc
push eax
lea edx, [esp + 0x48]
push edx
mov byte [esp + 0x120], 0x16
call fcn.0040dd30
lea ecx, [esp + 0xb0]
push ecx
push eax
lea edx, [esp + 0x50]
push edx
mov byte [esp + 0x12c], 0x17
call fcn.0040dd30
add esp, 0x30
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x100], 0x18
call fcn.00404a50
mov byte [esp + 0xfc], 0x17
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cbbf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 0x16
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cbe7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 0x15
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cc0f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 0x14
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cc37
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 0x13
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cc5f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x14]
cmp dword [ebp - 4], 1
mov esi, dword [ebp - 0xc]
jle 0x40cc7c
mov ecx, esi
push ecx
lea ecx, [esp + 0x18]
call fcn.00404ad0
mov ebp, dword [esp + 0x14]
push esi
lea edx, [esp + 0x90]
push ebp
push edx
call fcn.004a1690
mov eax, dword [esp + 0x28]
sub esp, 0x80
mov edi, esp
add eax, 0x148
mov ecx, 0x23
lea esi, [esp + 0xf0]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.0040ea70
sub dword [esp + 0x18], 1
mov edi, dword [esp + 0x1c]
jne 0x40cae3
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x38]
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40cef8
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov eax, 0xd41d41d5
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 7
test ecx, ecx
jle 0x40cef8
lea edx, [edi + 0x134]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x18], ecx
jmp 0x40cd25
mov edi, dword [esp + 0x1c]
push 0x8c
lea eax, [esp + 0x68]
push 0
push eax
call fcn.0049be70
add esp, 0xc
push 0
lea ecx, [esp + 0x58]
push ecx
push 0x8c
lea edx, [esp + 0x70]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea esi, [esp + 0x24]
mov eax, edi
call fcn.00426b50
mov esi, eax
push 0x4cffcc
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x108], 0x19
call fcn.0040dd30
push esi
push eax
lea edx, [esp + 0x44]
push edx
mov byte [esp + 0x114], 0x1a
call fcn.0040dc70
push 0x4cffcc
push eax
lea eax, [esp + 0x4c]
push eax
mov byte [esp + 0x120], 0x1b
call fcn.0040dd30
lea ecx, [esp + 0xb0]
push ecx
push eax
lea edx, [esp + 0x4c]
push edx
mov byte [esp + 0x12c], 0x1c
call fcn.0040dd30
add esp, 0x30
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x100], 0x1d
call fcn.00404a50
mov byte [esp + 0xfc], 0x1c
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ce01
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 0x1b
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ce29
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 0x1a
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ce51
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 0x19
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ce79
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 0x13
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cea1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x14]
cmp dword [ebp - 4], 1
mov esi, dword [ebp - 0xc]
jle 0x40cebe
mov ecx, esi
push ecx
lea ecx, [esp + 0x18]
call fcn.00404ad0
mov ebp, dword [esp + 0x14]
push esi
lea edx, [esp + 0x90]
push ebp
push edx
call fcn.004a1690
mov eax, dword [esp + 0x68]
sub esp, 0x80
mov edi, esp
mov ecx, 0x23
lea esi, [esp + 0xf0]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.0040ea70
sub dword [esp + 0x18], 1
jne 0x40cd21
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add ebp, 0xfffffff0
mov byte [esp + 0xfc], 0x12
lea ecx, [ebp + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cf24
mov ecx, dword [ebp]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebp
call edx
mov byte [esp + 0xfc], 9
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cf4c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xfc], 0
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cf74
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xfc], 0xffffffff
mov eax, dword [esp + 0x104]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cfa2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0xf4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xdc]
xor ecx, esp
call fcn.00493ab4
add esp, 0xec
ret 4