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

Disassembly:
push 0xffffffffffffffff
push 0x4bb81f
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x4ec6a0]
xor eax, esp
mov dword [esp + 0xdc], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4ec6a0]
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.00424e50
mov esi, eax
push 0x4ccf90
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x58]
push ecx
mov byte [esp + 0x108], 1
call fcn.0040d840
push esi
push eax
lea edx, [esp + 0x6c]
push edx
mov byte [esp + 0x114], 2
call fcn.0040d780
push 0x4ccf90
push eax
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0x120], 3
call fcn.0040d840
push str.rif.dat
push eax
lea ecx, [esp + 0x60]
push ecx
mov byte [esp + 0x12c], 4
call fcn.0040d840
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 0x40c447
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 0x40c46f
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 0x40c497
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 0x40c4bf
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.00424e50
mov esi, eax
push 0x4ccf90
lea ecx, [esp + 0x108]
push ecx
lea edx, [esp + 0x68]
push edx
mov byte [esp + 0x108], 0xa
call fcn.0040d840
push esi
push eax
lea eax, [esp + 0x50]
push eax
mov byte [esp + 0x114], 0xb
call fcn.0040d780
push 0x4ccf90
push eax
lea ecx, [esp + 0x64]
push ecx
mov byte [esp + 0x120], 0xc
call fcn.0040d840
push str.arif.dat
push eax
lea edx, [esp + 0x64]
push edx
mov byte [esp + 0x12c], 0xd
call fcn.0040d840
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 0x40c55a
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 0x40c582
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 0x40c5aa
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 0x40c5d2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.00474091
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40c5ec
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 0x40c82f
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 0x40c82f
mov dword [esp + 0x18], ecx
push 0x8c
lea edx, [esp + 0x68]
push 0
push edx
call fcn.00499500
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.00424e50
mov esi, eax
push 0x4ccf90
lea edx, [esp + 0x108]
push edx
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x108], 0x14
call fcn.0040d840
push esi
push eax
lea ecx, [esp + 0x44]
push ecx
mov byte [esp + 0x114], 0x15
call fcn.0040d780
push 0x4ccf90
push eax
lea edx, [esp + 0x48]
push edx
mov byte [esp + 0x120], 0x16
call fcn.0040d840
lea ecx, [esp + 0xb0]
push ecx
push eax
lea edx, [esp + 0x50]
push edx
mov byte [esp + 0x12c], 0x17
call fcn.0040d840
add esp, 0x30
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x100], 0x18
call fcn.00404a60
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 0x40c72f
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 0x40c757
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 0x40c77f
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 0x40c7a7
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 0x40c7cf
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 0x40c7ec
mov ecx, esi
push ecx
lea ecx, [esp + 0x18]
call fcn.00404ae0
mov ebp, dword [esp + 0x14]
push esi
lea edx, [esp + 0x90]
push ebp
push edx
call fcn.0049ed20
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.0040dba0
sub dword [esp + 0x18], 1
mov edi, dword [esp + 0x1c]
jne 0x40c653
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 0x40ca68
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 0x40ca68
lea edx, [edi + 0x134]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x18], ecx
jmp 0x40c895
mov edi, dword [esp + 0x1c]
push 0x8c
lea eax, [esp + 0x68]
push 0
push eax
call fcn.00499500
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.00424e50
mov esi, eax
push 0x4ccf90
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x108], 0x19
call fcn.0040d840
push esi
push eax
lea edx, [esp + 0x44]
push edx
mov byte [esp + 0x114], 0x1a
call fcn.0040d780
push 0x4ccf90
push eax
lea eax, [esp + 0x4c]
push eax
mov byte [esp + 0x120], 0x1b
call fcn.0040d840
lea ecx, [esp + 0xb0]
push ecx
push eax
lea edx, [esp + 0x4c]
push edx
mov byte [esp + 0x12c], 0x1c
call fcn.0040d840
add esp, 0x30
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x100], 0x1d
call fcn.00404a60
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 0x40c971
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 0x40c999
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 0x40c9c1
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 0x40c9e9
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 0x40ca11
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 0x40ca2e
mov ecx, esi
push ecx
lea ecx, [esp + 0x18]
call fcn.00404ae0
mov ebp, dword [esp + 0x14]
push esi
lea edx, [esp + 0x90]
push ebp
push edx
call fcn.0049ed20
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.0040dba0
sub dword [esp + 0x18], 1
jne 0x40c891
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 0x40ca94
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 0x40cabc
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 0x40cae4
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 0x40cb12
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.00491285
add esp, 0xec
ret 4