Function at 0x10050550
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4f4
push ebx
push esi
mov esi, ecx
push edi
cmp byte [esi + 8], 0
je 0x1005056e
test byte [esi + 4], 8
je 0x100507e0
lea eax, [ebp - 4]
mov byte [esi + 8], 0
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0xffffffff
jne 0x10050595
call ebx
test eax, eax
jne 0x100507e0
mov eax, dword [esi + 0x50]
test eax, eax
je 0x100505a1
cmp dword [eax], 0
jne 0x100505ae
mov ecx, dword [ebp - 4]
xor eax, eax
or eax, edi
mov dword [esi + 0x1c], ecx
mov dword [esi + 0x18], eax
mov edi, dword [esi + 0x10]
test edi, edi
jne 0x100505c8
mov edx, 1
lea eax, [ebp - 0x28c]
mov dword [ebp - 0x294], edx
jmp 0x10050613
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100505d0
sub ecx, edx
lea edx, [ecx + 1]
mov dword [ebp - 0x294], edx
cmp edx, 0x12c
ja 0x100505f2
lea eax, [ebp - 0x28c]
jmp 0x10050613
xor ecx, ecx
mov eax, edx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.102d8db3
mov edx, dword [ebp - 0x294]
add esp, 4
sub esp, 0xc
mov dword [ebp - 0x290], eax
mov ecx, eax
push edi
call fcn.100567f0
add esp, 0x10
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x290]
call dword [sym.imp.KERNEL32.dll_GetCompressedFileSizeW]
mov ecx, eax
lea edx, [ebp - 0x28c]
mov eax, dword [ebp - 0x290]
mov dword [ebp - 0x10], ecx
cmp eax, edx
je 0x10050658
push eax
call fcn.102d8dbc
mov ecx, dword [ebp - 0x10]
add esp, 4
cmp ecx, 0xffffffff
jne 0x1005066a
call ebx
test eax, eax
jne 0x100507e0
mov ecx, dword [ebp - 0x10]
mov edi, dword [esi + 0x54]
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x20], ecx
mov dword [esi + 0x24], eax
test edi, edi
jne 0x1005068d
mov edx, 1
lea eax, [ebp - 0x4ec]
mov dword [ebp - 0x4f4], edx
jmp 0x100506d5
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10050692
sub ecx, edx
lea edx, [ecx + 1]
mov dword [ebp - 0x4f4], edx
cmp edx, 0x12c
ja 0x100506b4
lea eax, [ebp - 0x4ec]
jmp 0x100506d5
xor ecx, ecx
mov eax, edx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.102d8db3
mov edx, dword [ebp - 0x4f4]
add esp, 4
sub esp, 0xc
mov dword [ebp - 0x4f0], eax
mov ecx, eax
push edi
call fcn.100567f0
add esp, 0x10
lea eax, [ebp - 0x34]
push eax
push 0
push dword [ebp - 0x4f0]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
mov ecx, dword [ebp - 0x4f0]
mov edi, eax
lea eax, [ebp - 0x4ec]
cmp ecx, eax
je 0x10050716
push ecx
call fcn.102d8dbc
add esp, 4
test edi, edi
je 0x100507dc
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
call fcn.100581e0
push dword [ebp - 0x1c]
mov dword [esi + 0x30], eax
push dword [ebp - 0x20]
mov dword [esi + 0x34], edx
call fcn.100581e0
push dword [ebp - 0x24]
mov dword [esi + 0x38], eax
push dword [ebp - 0x28]
mov dword [esi + 0x3c], edx
call fcn.100581e0
mov ebx, dword [ebp - 0x34]
add esp, 0x18
mov dword [esi + 0x44], edx
mov edx, ebx
and edx, 1
mov dword [esi + 0x40], eax
test bl, 2
je 0x10050764
or edx, 2
mov ecx, edx
mov eax, ebx
or ecx, 4
test bl, 4
cmove ecx, edx
mov edx, ecx
or edx, 8
test bl, 0x20
cmove edx, ecx
mov ecx, edx
or ecx, 0x10
test ebx, 0x100
cmove ecx, edx
mov edx, ecx
or edx, 0x40
test bl, 0x10
cmove edx, ecx
and al, 0x90
mov ecx, edx
or ecx, 0x20
cmp al, 0x10
cmove ecx, edx
mov dword [ebp - 4], ecx
mov dword [esi + 0x28], ecx
test cl, 0x20
je 0x100507b0
mov cl, 1
jmp 0x100507b2
xor cl, cl
mov byte [esi + 0x4c], cl
cmp ebx, 0xffffffff
jne 0x100507cc
mov dword [esi + 0x48], 0
mov byte [esi + 8], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test byte [ebp - 4], 0x40
mov eax, 0
setne al
inc eax
mov dword [esi + 0x48], eax
mov byte [esi + 8], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret