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

Disassembly:
push 0xffffffffffffffff
push 0x56e0df
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x5b16b0]
xor eax, esp
mov dword [esp + 0xdc], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5b16b0]
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.0042a2c0
mov esi, eax
push 0x592740
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x58]
push ecx
mov byte [esp + 0x108], 1
call fcn.0040dff0
push esi
push eax
lea edx, [esp + 0x6c]
push edx
mov byte [esp + 0x114], 2
call fcn.0040df30
push 0x592740
push eax
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0x120], 3
call fcn.0040dff0
push str.rif.dat
push eax
lea ecx, [esp + 0x60]
push ecx
mov byte [esp + 0x12c], 4
call fcn.0040dff0
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 0x40cb97
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 0x40cbbf
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 0x40cbe7
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 0x40cc0f
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.0042a2c0
mov esi, eax
push 0x592740
lea ecx, [esp + 0x108]
push ecx
lea edx, [esp + 0x68]
push edx
mov byte [esp + 0x108], 0xa
call fcn.0040dff0
push esi
push eax
lea eax, [esp + 0x50]
push eax
mov byte [esp + 0x114], 0xb
call fcn.0040df30
push 0x592740
push eax
lea ecx, [esp + 0x64]
push ecx
mov byte [esp + 0x120], 0xc
call fcn.0040dff0
push str.arif.dat
push eax
lea edx, [esp + 0x64]
push edx
mov byte [esp + 0x12c], 0xd
call fcn.0040dff0
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 0x40ccaa
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 0x40ccd2
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 0x40ccfa
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 0x40cd22
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.0047c271
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40cd3c
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 0x40cf7f
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 0x40cf7f
mov dword [esp + 0x18], ecx
push 0x8c
lea edx, [esp + 0x68]
push 0
push edx
call fcn.004a1c90
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.0042a2c0
mov esi, eax
push 0x592740
lea edx, [esp + 0x108]
push edx
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x108], 0x14
call fcn.0040dff0
push esi
push eax
lea ecx, [esp + 0x44]
push ecx
mov byte [esp + 0x114], 0x15
call fcn.0040df30
push 0x592740
push eax
lea edx, [esp + 0x48]
push edx
mov byte [esp + 0x120], 0x16
call fcn.0040dff0
lea ecx, [esp + 0xb0]
push ecx
push eax
lea edx, [esp + 0x50]
push edx
mov byte [esp + 0x12c], 0x17
call fcn.0040dff0
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 0x40ce7f
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 0x40cea7
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 0x40cecf
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 0x40cef7
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 0x40cf1f
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 0x40cf3c
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.004a7200
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.0040ed90
sub dword [esp + 0x18], 1
mov edi, dword [esp + 0x1c]
jne 0x40cda3
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 0x40d1b8
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 0x40d1b8
lea edx, [edi + 0x134]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x18], ecx
jmp 0x40cfe5
mov edi, dword [esp + 0x1c]
push 0x8c
lea eax, [esp + 0x68]
push 0
push eax
call fcn.004a1c90
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.0042a2c0
mov esi, eax
push 0x592740
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x108], 0x19
call fcn.0040dff0
push esi
push eax
lea edx, [esp + 0x44]
push edx
mov byte [esp + 0x114], 0x1a
call fcn.0040df30
push 0x592740
push eax
lea eax, [esp + 0x4c]
push eax
mov byte [esp + 0x120], 0x1b
call fcn.0040dff0
lea ecx, [esp + 0xb0]
push ecx
push eax
lea edx, [esp + 0x4c]
push edx
mov byte [esp + 0x12c], 0x1c
call fcn.0040dff0
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 0x40d0c1
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 0x40d0e9
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 0x40d111
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 0x40d139
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 0x40d161
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 0x40d17e
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.004a7200
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.0040ed90
sub dword [esp + 0x18], 1
jne 0x40cfe1
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 0x40d1e4
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 0x40d20c
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 0x40d234
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 0x40d262
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.00499441
add esp, 0xec
ret 4