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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1001c
call fcn.00404460
push ebx
push esi
push 1
push 3
xor ebx, ebx
push 1
push SysReAllocString
mov dword [ebp - 0x10], ebx
call fcn.00401843
push eax
call fcn.004024b1
mov esi, eax
add esp, 0x14
cmp esi, 0xffffffff
mov dword [ebp - 4], esi
je 0x403bbc
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [0x405294]
mov dword [ebp - 0x14], eax
cmp eax, edi
jle 0x403bb2
push ebx
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x1001c]
push 0x10000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403bb2
mov eax, dword [ebp - 8]
lea esi, [ebp - 0x1001c]
add eax, 0xffffffec
cmp eax, ebx
jle 0x403bb2
cmp dword [esi], 0x4d46504d
je 0x4037bd
inc esi
lea edx, [ebp - 0x1001c]
mov ecx, esi
sub ecx, edx
cmp ecx, eax
jl 0x4037a1
jmp 0x403bb2
mov eax, dword [esi + 8]
add esi, 8
push eax
add esi, 4
call fcn.00401873
mov eax, dword [esi]
add esi, 4
push eax
call fcn.00401883
mov eax, dword [esi]
add esi, 4
push eax
call fcn.00401893
add esp, 0xc
call fcn.0040187d
sub eax, ebx
je 0x403936
dec eax
je 0x403801
dec eax
je 0x403936
jmp 0x403bb2
push 3
call fcn.004018a3
test eax, eax
pop ecx
je 0x403bb2
push esi
call fcn.004036f1
mov esi, eax
lea edx, [ebp - 0x1001c]
mov eax, dword [esi]
add esi, 4
mov ecx, esi
mov dword [ebp - 0xc], eax
sub ecx, edx
add edi, ecx
push edi
push eax
push str.application_x_shockwave_flash
push str.http:__fmchost.metaproducts.com_fmc.swf
push ebx
call fcn.00403694
movsx eax, byte [esi + 3]
push eax
call fcn.00401967
push dword [ebp - 0xc]
call fcn.004036f1
add edi, eax
add esp, 0x20
cmp dword [ebp - 0x14], edi
jle 0x403bb2
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push edi
push dword [ebp - 4]
call esi
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x1001c]
push 0x10000
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403bb2
mov eax, dword [0x405298]
cmp dword [ebp - 8], eax
jle 0x403bb2
mov ecx, dword [ebp - 0x1001c]
add edi, eax
push edi
push ecx
push str.application_x_shockwave_flash
push str.http:__fmchost.metaproducts.com_fmcs.swf
push 1
mov dword [ebp - 0xc], ecx
call fcn.00403694
push dword [ebp - 0xc]
call fcn.004036f1
add edi, eax
add esp, 0x18
cmp dword [ebp - 0x14], edi
jle 0x403bb2
push ebx
push ebx
push edi
push dword [ebp - 4]
call esi
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x1001c]
push 0x10000
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403bb2
mov eax, dword [0x405298]
cmp dword [ebp - 8], eax
jle 0x403bb2
mov esi, dword [ebp - 0x1001c]
add edi, eax
push edi
push esi
push str.video_flv
push 0x406344
push 2
call fcn.00403694
add esi, edi
add esp, 0x14
xor eax, eax
cmp esi, dword [ebp - 0x14]
setle al
jmp 0x403baf
mov eax, dword [esi]
push eax
mov dword [ebp - 0x1c], eax
call fcn.004018a3
test eax, eax
pop ecx
je 0x403bb2
lea eax, [ebp - 0x1001c]
sub esi, eax
lea esi, [edi + esi + 4]
cmp dword [ebp - 0x14], esi
jle 0x403bb2
xor edi, edi
cmp dword [ebp - 0x1c], ebx
mov dword [ebp - 0xc], edi
jle 0x403ba7
push esi
call fcn.004036f1
pop ecx
mov esi, eax
push ebx
push ebx
push esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x1001c]
push 0x10000
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403b93
mov eax, dword [ebp - 8]
cmp eax, dword [0x405298]
jle 0x403b93
lea ebx, [edi + edi*4]
shl ebx, 2
call fcn.0040193b
mov ecx, dword [ebp - 0x1001c]
mov dword [eax + ebx + 0xc], ecx
mov eax, dword [0x405298]
push dword [ebp - 0x10018]
lea esi, [esi + eax*2]
lea eax, [ebp - 0x10014]
push edi
push eax
call fcn.004035ca
push eax
call fcn.004036f1
mov edx, dword [0x405298]
mov ecx, dword [ebp + eax - 0x10014]
lea edi, [ebp + eax - 0x10014]
add edx, eax
add esp, 0x10
add edi, 4
add esi, edx
test ecx, ecx
je 0x403a24
push ecx
push dword [ebp - 0xc]
push edi
call fcn.0040360c
push eax
call fcn.004036f1
add esp, 0x10
add esi, eax
add edi, eax
jmp 0x403a2e
call fcn.0040193b
and dword [eax + ebx + 4], 0
mov eax, dword [edi]
add esi, dword [0x405298]
test eax, eax
je 0x403a54
push eax
add edi, 4
push dword [ebp - 0xc]
push edi
call fcn.00403650
push eax
call fcn.004036f1
add esp, 0x10
add esi, eax
jmp 0x403a5e
call fcn.0040193b
and dword [eax + ebx + 8], 0
xor eax, eax
cmp dword [ebp - 0xc], eax
jne 0x403b7a
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push eax
push eax
push esi
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push 0
push eax
lea eax, [ebp - 0x1001c]
push 0x10000
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403ba5
mov eax, dword [0x405298]
cmp dword [ebp - 8], eax
jle 0x403ba5
add esi, eax
mov eax, dword [ebp - 0x1001c]
test eax, eax
je 0x403aea
lea eax, [eax + eax + 2]
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.MSVCRT.dll_malloc]
push dword [ebp - 0x10]
lea ecx, [ebp - 0x10018]
mov dword [ebp - 0x18], eax
push ecx
push eax
call sub.MSVCRT.dll_memcpy
push dword [ebp - 0x18]
call fcn.00401947
push dword [ebp - 0x10]
call fcn.004036f1
add esp, 0x18
add esi, eax
push 0
push 0
push esi
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push 0
push eax
lea eax, [ebp - 0x1001c]
push 0x10000
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403ba5
mov eax, dword [0x405298]
cmp dword [ebp - 8], eax
jle 0x403ba5
add esi, eax
mov eax, dword [ebp - 0x1001c]
test eax, eax
je 0x403b62
lea edi, [eax + eax + 2]
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
lea ecx, [ebp - 0x10018]
push edi
push ecx
push eax
mov dword [ebp - 0x18], eax
call sub.MSVCRT.dll_memcpy
push dword [ebp - 0x18]
call fcn.00401957
push edi
call fcn.004036f1
add esp, 0x18
add esi, eax
jmp 0x403b64
xor edi, edi
push edi
call fcn.004036f1
movsx eax, byte [ebp + eax - 0x10015]
push eax
call fcn.00401967
pop ecx
pop ecx
call fcn.0040193b
mov dword [eax + ebx + 0x10], esi
call fcn.0040193b
add esi, dword [eax + ebx + 0xc]
cmp dword [ebp - 0x14], esi
jl 0x403ba5
xor ebx, ebx
mov edi, dword [ebp - 0xc]
inc edi
cmp edi, dword [ebp - 0x1c]
mov dword [ebp - 0xc], edi
jl 0x40396d
jmp 0x403ba7
xor ebx, ebx
xor eax, eax
cmp dword [ebp - 0xc], ebx
setg al
mov dword [ebp - 0x10], eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, dword [ebp - 0x10]
pop esi
pop ebx
leave
ret