Function at 0x1002ff42
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x6c
push ebx
push esi
push edi
mov eax, edx
mov ebx, ecx
xor esi, esi
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], ebx
mov edi, esi
push 0xd
pop ecx
test eax, eax
je 0x1003030c
mov edx, dword [eax]
test edx, edx
je 0x1003030c
cmp dword [eax + 4], esi
je 0x1003030c
cmp dword [eax + 0xc], esi
je 0x1003030c
cmp dword [ebp + 8], esi
je 0x1003030c
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x1003030c
cmp dword [eax], esi
je 0x1003030c
mov ecx, ebx
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
call fcn.10030a0e
mov ebx, eax
mov dword [ebp - 8], esi
mov ecx, edx
mov dword [ebp - 0x14], ebx
call fcn.100310a3
mov dword [ebp - 0x18], eax
test eax, eax
je 0x10030376
lea ecx, [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test ebx, ebx
je 0x1002fffd
lea esi, [ebx + 0x88]
mov ebx, dword [ebp - 0x24]
push 0x10
pop ecx
lea edi, [ebp - 0x68]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x5c]
mov esi, dword [ebp - 0x28]
and eax, 0xffffff
add esi, dword [ebp - 0x60]
mov dword [ebp - 0x28], esi
adc ebx, eax
mov dword [ebp - 0x24], ebx
jmp 0x10030003
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x28]
mov eax, dword [ebp - 0xc]
xor edi, edi
inc edi
cmp word [eax + 8], di
jne 0x10030042
mov edx, dword [ebp + 0xc]
jmp 0x1003003c
test byte [edx + 0xf], 2
je 0x1003003c
cmp dword [edx + 0x24], 0
je 0x1003003c
mov ecx, dword [edx + 0xc]
mov eax, dword [edx + 8]
and ecx, 0xffffff
add eax, 0x32
adc ecx, 0
add esi, eax
mov dword [ebp - 0x28], esi
adc ebx, ecx
mov dword [ebp - 0x24], ebx
mov edx, dword [edx]
test edx, edx
jne 0x10030014
mov eax, dword [ebp + 8]
cmp ebx, dword [eax + 4]
jl 0x1003005f
jg 0x10030050
cmp esi, dword [eax]
jbe 0x1003005f
mov dword [eax], esi
mov dword [eax + 4], ebx
push 0xea
jmp 0x10030370
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebx]
call fcn.10026be7
cmp word [ebx + 8], di
jne 0x100300f7
mov eax, dword [ebp + 0xc]
mov esi, dword [eax]
jmp 0x100300f3
test byte [esi + 0xf], 2
je 0x100300f1
xor ecx, ecx
cmp dword [esi + 0x24], ecx
je 0x100300f1
mov edx, dword [ebx + 4]
lea eax, [esi + 0x28]
push ecx
push edi
push ecx
push ecx
push eax
push ecx
push ecx
mov ecx, dword [ebp - 4]
push esi
call fcn.10021006
test eax, eax
je 0x10030376
mov ecx, dword [ebx]
lea edx, [esi + 0x28]
push 0
push 0
call fcn.100336a9
mov ecx, eax
mov dword [ebp - 0x14], ecx
test ecx, ecx
je 0x100300f1
mov eax, dword [esi + 0x24]
and dword [ebp - 0xc], 0
mov dword [ebp - 8], edi
mov dword [ecx + 0x24], eax
test eax, eax
je 0x100300f1
mov edx, ecx
mov ecx, dword [ebx + 4]
call fcn.10038647
test eax, eax
je 0x10030376
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, dword [ecx + 0x24]
jb 0x100300d0
mov esi, dword [esi]
test esi, esi
jne 0x1003007d
cmp dword [0x10086688], 0
je 0x1003019c
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x14]
push 0
push eax
push dword [0x10086684]
lea edx, [ebp - 0xc]
push dword [0x10086680]
call fcn.1003cfd2
mov esi, eax
test esi, esi
jns 0x10030132
push esi
push 0xda
jmp 0x10030333
mov eax, dword [ebp + 8]
mov edx, dword [ebx + 4]
mov ecx, dword [eax]
sub ecx, dword [ebp - 0x28]
mov eax, dword [eax + 4]
sbb eax, dword [ebp - 0x24]
push ecx
push ecx
push eax
push ecx
push dword [0x10086688]
mov ecx, dword [ebp - 4]
push dword [ebp - 0xc]
call fcn.1003d7bf
mov esi, eax
test esi, esi
jns 0x10030169
push esi
push 0xe5
jmp 0x10030333
cmp dword [0x10086688], 0
je 0x1003017c
push 0xea
jmp 0x1003030d
lea eax, [ebp - 0x28]
mov dword [ebp - 8], edi
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x10030376
add dword [ebp - 0x28], 0x32
adc dword [ebp - 0x24], 0
mov esi, dword [ebp + 0xc]
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
cmp dword [esi], ecx
je 0x1003030c
mov esi, dword [esi]
mov al, byte [esi + 0xf]
test al, 3
jne 0x100302fa
test al, 0x10
jne 0x10030221
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 8]
and ecx, 0xffffff
mov edx, dword [ebp - 0x24]
add eax, 0x32
adc ecx, 0
add dword [ebp - 0x28], eax
adc edx, ecx
cmp dword [ebp - 8], 0
mov dword [ebp - 0x24], edx
je 0x100301f9
mov eax, dword [ebp + 8]
cmp edx, dword [eax + 4]
jg 0x1003031e
jl 0x100301f9
mov ecx, dword [ebp - 0x28]
cmp ecx, dword [eax]
ja 0x1003031e
mov edx, dword [ebx + 4]
lea eax, [esi + 0x28]
xor ecx, ecx
push ecx
push edi
push ecx
push ecx
push eax
push ecx
push ecx
mov ecx, dword [ebp - 4]
push esi
call fcn.10021006
test eax, eax
je 0x10030376
mov dword [ebp - 8], edi
jmp 0x100302f1
test byte [esi + 0x1c], 1
jne 0x100302f1
mov eax, ebx
lea ecx, [esi + 0x28]
mov dword [ebp - 0x10], eax
push 0
mov edx, ecx
mov ecx, dword [eax + 4]
push edi
call fcn.100336a9
test eax, eax
jne 0x100302f1
mov eax, dword [ebp - 0x10]
lea ecx, [esi + 0x28]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x10030233
cmp dword [ebp - 8], 0
je 0x1003027a
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 0x24]
cmp eax, dword [ecx + 4]
jg 0x1003031e
jl 0x1003027a
mov eax, dword [ebp - 0x28]
cmp eax, dword [ecx]
jae 0x1003031e
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x14]
push 0
push eax
push dword [esi + 0x14]
lea edx, [ebp - 0xc]
push dword [esi + 0x10]
call fcn.1003cfd2
mov esi, eax
test esi, esi
js 0x1003032d
mov eax, dword [ebp + 8]
mov edx, dword [ebx + 4]
mov ecx, dword [eax]
sub ecx, dword [ebp - 0x28]
mov eax, dword [eax + 4]
sbb eax, dword [ebp - 0x24]
push ecx
push ecx
push eax
push ecx
push dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
push dword [ebp - 0xc]
call fcn.1003d7bf
mov esi, eax
test esi, esi
js 0x10030325
cmp dword [0x10086688], 0
jne 0x10030172
lea eax, [ebp - 0x28]
mov dword [ebp - 8], edi
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x10030376
add dword [ebp - 0x28], 0x32
adc dword [ebp - 0x24], 0
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
mov eax, dword [eax]
jmp 0x100302ff
mov eax, dword [esi]
mov esi, dword [ebp + 0xc]
mov dword [esi], eax
test eax, eax
jne 0x100301ac
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, 0xea
jmp 0x1003030c
push esi
push 0x14b
jmp 0x10030333
push esi
push 0x140
mov ecx, 0x10006808
call fcn.1003a254
test esi, 0x10000000
je 0x1003035e
push esi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
cmp eax, 0x13d
je 0x1003036f
push esi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov esi, eax
jmp 0x1003036f
mov eax, esi
and eax, 0x1fff0000
cmp eax, 0x70000
jne 0x1003036f
movzx esi, si
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10030315