Function at 0x40876c
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
push esi
push edi
push 0x64
xor esi, esi
lea eax, [ebx + 0x58]
push esi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push dword [ebp + 8]
mov dword [ebp - 0xc], esi
call fcn.00446454
cmp eax, 0xffffffff
pop ecx
mov dword [ebp + 8], eax
je 0x4089e5
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea esi, [ebx + 0x44]
push edi
mov eax, esi
call fcn.0044493e
push edi
push dword [esi]
push dword [ebp + 8]
call fcn.004459ef
add esp, 0xc
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esi]
and dword [ebp - 0x18], 0
lea eax, [ebx + 0x54]
mov dword [ebp - 0x1c], esi
mov dword [ebx + 0xb4], esi
push eax
lea esi, [ebp - 0x20]
mov dword [ebp - 0x20], edi
mov dword [ebx + 0xb8], edi
call fcn.00444dbb
push 0
push 4
pop edi
call fcn.0044489a
lea eax, [ebx + 0x64]
push eax
call fcn.00444daa
push 0
call fcn.0044489a
push 0
call fcn.0044489a
lea eax, [ebx + 0x6c]
push eax
lea eax, [ebx + 0x70]
mov ecx, esi
call fcn.00445188
and dword [ebp + 8], 0
lea eax, [ebp + 8]
push eax
call fcn.0044489a
mov eax, dword [ebp + 8]
push 0xc
xor edx, edx
pop ecx
div ecx
and dword [ebp - 0x10], 0
test eax, eax
jbe 0x4089e5
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp + 8], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], eax
lea eax, [ebp + 8]
push eax
push 4
pop edi
lea esi, [ebp - 0x20]
call fcn.0044489a
lea eax, [ebp - 8]
push eax
call fcn.0044489a
lea eax, [ebp - 0x14]
push eax
call fcn.0044489a
cmp dword [ebp + 8], 3
jne 0x40887a
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
dec dword [ebp - 4]
jne 0x408842
mov eax, dword [ebp - 0x10]
test eax, eax
jbe 0x4089e5
push 0
push 8
pop edi
lea esi, [ebp - 0x20]
mov dword [ebp - 0x18], eax
call fcn.0044489a
and dword [ebp - 0x10], 0
lea eax, [ebp - 0x10]
push eax
push 4
pop edi
call fcn.0044489a
mov eax, dword [ebp - 0x10]
cmp eax, 7
mov dword [ebx + 0x80], eax
push 0
jne 0x4088be
push 0x1e
jmp 0x4088c0
push 0xa
pop edi
call fcn.0044489a
and dword [ebp + 8], 0
and dword [ebp - 0x14], 0
lea eax, [ebp + 8]
push eax
push 4
pop edi
lea esi, [ebp - 0x20]
call fcn.0044489a
xor edi, edi
push 0
inc edi
call fcn.0044489a
lea eax, [ebp - 0x14]
push eax
push 4
pop edi
call fcn.0044489a
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
sub dword [ebp + 8], 5
add ecx, eax
mov dword [ebp - 0x14], ecx
add eax, 0x10
mov ecx, esi
mov dword [ebx + 0x7c], eax
call fcn.00444884
cmp eax, dword [ebp + 8]
jb 0x4089de
and dword [ebp - 8], 0
push 0x18
lea eax, [ebp - 8]
push eax
mov eax, 0x461c1c
call fcn.0044c82d
test eax, eax
je 0x4089de
and dword [ebp - 4], 0
push 8
pop ecx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x70]
mov byte [ebp - 0x70], 8
mov dword [ebp - 0x6c], 0x6610
mov byte [ebp - 0x6f], 2
mov dword [ebp - 0x68], 0x20
lea esi, [ebx + 4]
lea edi, [ebp - 0x64]
push eax
push dword [ebp - 8]
rep movsd dword es:[edi], dword [esi]
mov esi, 0x461c1c
mov eax, esi
call fcn.0044c715
test eax, eax
mov dword [ebp - 0xc], eax
je 0x4089d2
cmp dword [ebp - 4], 0
je 0x4089d2
mov edi, dword [ebp - 0x14]
lea eax, [ebp + 8]
push eax
push edi
push dword [ebp - 4]
mov eax, esi
call fcn.0044c742
push dword [ebp - 4]
mov dword [ebp - 0xc], eax
mov eax, esi
call fcn.0044c6f6
mov eax, dword [ebp + 8]
cmp eax, 0x10
jbe 0x4089d2
test edi, edi
je 0x4089d2
mov byte [edi + eax], 0
mov eax, dword [ebp + 8]
mov byte [edi + eax + 1], 0
mov eax, dword [ebp + 8]
mov byte [edi + eax + 2], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
add edi, 0x10
mov dword [ebx + 0x78], eax
mov eax, ebx
mov dword [ebx + 0x74], edi
call fcn.0040868e
push dword [ebp - 8]
mov eax, esi
call fcn.0044c76f
jmp 0x4089e5
mov dword [ebx + 0x50], 0xffffffec
mov eax, dword [ebp - 0xc]
pop edi
pop esi
leave
ret 4